onflow / cadence-tools

Developer tools for Cadence
https://www.onflow.org/
Apache License 2.0
24 stars 20 forks source link

[LS] Reported errors on caps #284

Open bjartek opened 8 months ago

bjartek commented 8 months ago

Current Behavior

│  mismatched types. expected `Capability<&{A.ee82856bf20e2aa6.FungibleToken.Receiver}>`, got `Capability<&{S.FungibleToken.FungibleToken.Receiver}>` [51, 52] //when using import "FungibleToken"

│  mismatched types. expected `Capability<&{A.ee82856bf20e2aa6.FungibleToken.Receiver}>`, got `Capability<&{S./my/local/path/contracts/standard/FungibleToken.cdc.FungibleToken.Receiver}>` [147, 48] when using file based import import FungibleToken from "../bla/bla/FungibleToken.cdc"

Expected Behavior

This is not an error

Steps To Reproduce

Open this file with new ls via flow-cli in feature/stable-cadence. I have setup cadence-lsp in Nvim with https://github.com/findonflow/find/tree/feat/stable-cadence


 Language client log: /Users/bjartek/.local/state/lazyvim/lsp.log
 Detected filetype:   cdc

 1 client(s) attached to this buffer: 

 Client: cadence (id: 1, bufnr: [16])
    filetypes:       cdc
    autostart:       true
    root directory:  /Users/bjartek/dev/find
    cmd:             /Users/bjartek/bin/flow cadence language-server

 Configured servers list: gopls, cadence, jsonls, yamlls, lua_ls, tsserver

the flow binary here is a self built one from HEAD of feature/stable-cadence

Environment

- Cadence version: latest stable cadence
- Network: emulator
bjartek commented 8 months ago

source code is here : https://github.com/findonflow/find/tree/feat/stable-cadence