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
{{ message }}
Repository navigation
Go-to-definition fails for a use of a provided constructor #5538
Area-LangService-Navigationgo to definition, F1 help + the FCS APIs related to itBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.
Install FSharp.Data (3.0.0-beta4 is what I tested with)
Add the following code:
openFSharp.DatatypeMyCSV= CsvProvider<"1, 2, 3, 4, 5">// Go to definition on 'MyCSV' works here.letsample= MyCSV.GetSample()// Go to definition on 'MyCSV' does not work here.letnoWorky= MyCSV()
Note that in the first case, Go to Definition succeeds. In fact, it seems to succeed in all cases aside from the noWorky sample. Note that semantic highlighting does not pick up the declaration of MyCSV in the latter case, probably indicating that something is not getting resolved correctly in name resolution.
This is not a regression as far as we can tell, at least not with any previous VS 2017 release.
changed the title [-]Go to definition fails on Type Provider name declaration if it is used like a constructor[/-][+]Type Provider name isn't resolved correctly if it is used like a constructor[/+]on Aug 20, 2018
@jackfoxy I'm a bit confused. Regardless of it new is used, there is not semantic highlighting for the name declared for the type provider.
Note that in the last line, if MyCSV is clicked, no semantic highlighting is applied. This means that somehow it is somehow treated as a different symbol than the actual declaration.
@jackfoxy, sorry, I think we're talking past each other here. When you say Go to Definition doesn't work for you, are you referring to the special case listed in the original issue text, or Go to Definition under any circumstance?
changed the title [-]Type Provider name isn't resolved correctly if it is used like a constructor[/-][+]Go-to-definition fails for a use of a provided constructor[/+]on Apr 5, 2022
Area-LangService-Navigationgo to definition, F1 help + the FCS APIs related to itBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.
Activity
[-]Go to definition fails on Type Provider name declaration if it is used like a constructor[/-][+]Type Provider name isn't resolved correctly if it is used like a constructor[/+]jackfoxy commentedon Aug 21, 2018
@cartermp my actual example:
I think the semantic highlighting you are experiencing is lack of the "new" keyword. With that keyword I see no semantic hints.
cartermp commentedon Aug 21, 2018
@jackfoxy I'm a bit confused. Regardless of it
newis used, there is not semantic highlighting for the name declared for the type provider.Note that in the last line, if
MyCSVis clicked, no semantic highlighting is applied. This means that somehow it is somehow treated as a different symbol than the actual declaration.jackfoxy commentedon Aug 21, 2018
Everything else about the TP works for me, just not Go To Definition.
cartermp commentedon Aug 21, 2018
@jackfoxy, sorry, I think we're talking past each other here. When you say Go to Definition doesn't work for you, are you referring to the special case listed in the original issue text, or Go to Definition under any circumstance?
jackfoxy commentedon Aug 21, 2018
@cartermp just the special case in the original report.
[-]Type Provider name isn't resolved correctly if it is used like a constructor[/-][+]Go-to-definition fails for a use of a provided constructor[/+]release-notes: add PR link for #5538
Fix Go-to-Definition for provided constructors without definition loc…