Dreamescaper / IntelliSenseExtender

GNU General Public License v3.0
88 stars 17 forks source link

Extender works wrongly when I compare List.Count and another variable #26

Closed sh2ezo closed 6 years ago

sh2ezo commented 6 years ago

Hello!

I have an instance of List and I also have some variable. When I need to compare List.Count with variable and I write "<", Extender suggests a types, though I need a variables. I think, this is going on because List is derived from IEnumerable and IEnumerable has extension method Count.

image

I think, in such cases (type has fields and methods with same names), You can suggest variables and types.

Dreamescaper commented 6 years ago

So you don't have _maxAllowedTasks suggestion at all? That's really strange, because that's native VS functionality, not from extension. I have a plan to infer type on such cases, so suitable items would be suggested first, but anyway variable suggestion should be always present, I haven't changed anything there.

Would you be able to send project where it happens?

sh2ezo commented 6 years ago

That's really strange, because that's native VS functionality, not from extension

After this words tried to disable extension and variable did not appear again

On this week I upgraded my VS2017 to 15.7.2. And I don't remember I wrote code like that after upgrade (compare List.Count and variables). Can VS be broken after upgrade?

Dreamescaper commented 6 years ago

Don't know, cannot reproduce that (neither with 15.7.2, nor with 15.8.0 Preview).

sh2ezo commented 6 years ago

I will try to reinstall my VS

Test project: SuggestionsTest.zip

Dreamescaper commented 6 years ago

Tested your example. You're absolutely right - that's due to Linq method Count() - I cannot reproduce that with missing Linq using. Still, that's Roslyn issue, not IntelliSense Extender.

Interesting, that it happens only for '<' operator. Probably it thinks that it is generic brackets.