Registry Mirror
Skip to content

Nameof function is available, when it is not available... #7826

Closed

Description

@abelbraaksma

See:

image

Repro steps

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

Activity

  1. TIHan commented on Nov 7, 2019

    @TIHan
    Contributor

    Yes, the function should not be shown in lists and tooltips.

  2. added
    Impact-Low
    on Aug 31, 2020
  3. cartermp commented on Mar 18, 2021

    @cartermp
    Contributor

    Note that it is not longer active in IntelliSense or tooltips if you specify an older langversion:

    image

    image

    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.

  4. modified the milestones: Backlog, 16.9 on Mar 18, 2021
  5. abelbraaksma commented on Apr 20, 2021

    @abelbraaksma
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-LangService-APIBugImpact-Low

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions