zzarchive-VisualFSharpPowerTools
zzarchive-VisualFSharpPowerTools copied to clipboard
"Resolve unopened" does not fix types whose unqualified names match opened modules
I would like to get a "resolve unopened" fix for this (open Sytem
)
String.Format("{0}", 42)
But I don't, because String
is a valid, in-scope F# module name, so I just get squiggles telling me Format
is not a valid function.
Well, I didn't think of this case. We chose to show "resolve unopened" smart tag only for the first identifier in an island, which is wrong here.
We should allow smart tags on any identifier in an island and do suffix matching. Of course, one has to adjust insertion range in order to insert fully qualified identifier correctly.
@vasily-kirichenko How difficult is this to correct the behaviour?
@dungpa I'll try to fix this. However, I'm not sure how hard it will be since the feature implementation is a bit complicated.
I understand. It's one of the most complex parts in the code base.
Sorry for that :( it should be refactored - more types, shorter functions.
Hehe, it wasn't a complaint. Complexity is mostly due to nature of the task.
@vasily-kirichenko Have you tried to tackle this?
No.
The feature has been ported to VFT repo.