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 }}
Nameof function is available, when it is not available... #7826
When you don't specify a preview version, the nameof operator is available in the IDE of Visual Studio 2019 16.3.7 (not preview).
Expected behavior
If the function is not available, it should not be available in the prediction lists and tooltips.
Actual behavior
When typing '\n', upon hitting the n and then wanting to type the next ', it gets auto-replaced by '\nameof, which surprised me (apart from the slightly annoying auto-replace inside the context of a char), because I didn't have preview mode on (I believe this can be done by setting the version in the project file somehow).
Note that it is not longer active in IntelliSense or tooltips if you specify an older langversion:
But the quick fixer does suggest to try and open FSharp.Core.Operators.
I think that's fine and I highly doubt we'll ever fix that TBH. You can technically reference stuff from a core library if it's available, so that might be arguably by design? I guess we could special case things but I don't really think that's worth our time.
Thanks for taking care of this. On your last comment, it may surprise people, as after the quickfix the error won't go away. But I agree it's hardly worth fixing, until perhaps at some time we have a list of non reserved keywords that aren't really keywords and use that as filter...
Activity
TIHan commentedon Nov 7, 2019
Yes, the function should not be shown in lists and tooltips.
cartermp commentedon Mar 18, 2021
Note that it is not longer active in IntelliSense or tooltips if you specify an older langversion:
But the quick fixer does suggest to try and open FSharp.Core.Operators.
I think that's fine and I highly doubt we'll ever fix that TBH. You can technically reference stuff from a core library if it's available, so that might be arguably by design? I guess we could special case things but I don't really think that's worth our time.
abelbraaksma commentedon Apr 20, 2021
Thanks for taking care of this. On your last comment, it may surprise people, as after the quickfix the error won't go away. But I agree it's hardly worth fixing, until perhaps at some time we have a list of non reserved keywords that aren't really keywords and use that as filter...