onflow/cadence-tools

[LS] Quick fix -> Add missing members not working properly

Opened this issue · 0 comments

Problem

When you use the aforementioned tool for adding e.g. missing functions to a contract or resource, the access modifier is badly constructed. It'll say all fun rather than access(all) fun. It also forgets the view modifier if the function has it.

Steps to Reproduce

This was found updating FungibleToken contracts to Cadence 1.0 and the new FT standard. Just create a contract or resource that implements an interface with any function declared on it, then scroll over its name to get to the vscode popup that shows you the error and allows you to apply the quick fix.

Context

This may be related to onflow/vscode-cadence#563