zzarchive-VisualFSharpPowerTools icon indicating copy to clipboard operation
zzarchive-VisualFSharpPowerTools copied to clipboard

"Resolve unopened" does not fix types whose unqualified names match opened modules

Open latkin opened this issue 10 years ago • 8 comments

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.

latkin avatar Oct 09 '14 22:10 latkin

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 avatar Oct 10 '14 09:10 dungpa

@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.

vasily-kirichenko avatar Oct 10 '14 11:10 vasily-kirichenko

I understand. It's one of the most complex parts in the code base.

dungpa avatar Oct 10 '14 14:10 dungpa

Sorry for that :( it should be refactored - more types, shorter functions.

vasily-kirichenko avatar Oct 10 '14 14:10 vasily-kirichenko

Hehe, it wasn't a complaint. Complexity is mostly due to nature of the task.

dungpa avatar Oct 10 '14 20:10 dungpa

@vasily-kirichenko Have you tried to tackle this?

dungpa avatar Oct 28 '14 09:10 dungpa

No.

vasily-kirichenko avatar Oct 28 '14 10:10 vasily-kirichenko

The feature has been ported to VFT repo.

vasily-kirichenko avatar Dec 22 '16 08:12 vasily-kirichenko