You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Go To Reference" stops working if there's an error in a line of code of instance method.
This issue appears to only be reproduced when used as an instance method in Package.swift project.. There is no problem with global methods.
For example:
structFoo{func callMethod(){bla(B:"", d:10)// THIS "Goto references" doesn't work}func bla(// this cannot goto references
B:String,
d:String){}}func callMethod(){bla(B:"", d:10)// THIS "Goto references" works fine even though it has an error in a line}func bla(// this can goto references
B:String,
d:String){}
Can be reproduced with VS Code, swift extension
The text was updated successfully, but these errors were encountered:
Thinking about this, I think we should not report a reference in either case because bla never unambiguously references the function or method.
The reason why we do report the reference to the top-level function currently is that it gets type checked into a DeclRefExpr, which apparently resolves to the top-level function, while in the member case it gets type checked to a UnresolvedDotExpr, ie. a member access on self and that doesn’t get resolved during type checking.
"Go To Reference"
stops working if there's an error in a line of code of instance method.This issue appears to only be reproduced when used as an instance method in
Package.swift
project.. There is no problem with global methods.For example:
Can be reproduced with VS Code, swift extension
The text was updated successfully, but these errors were encountered: