Skip to content

Use of nameof changes name resolution rules #8661

@auduchinok

Description

@auduchinok

It seems using nameof makes symbol resolved using type name resolution rules first.

let f (obj: obj) =
    nameof obj

In this example obj inside the function is resolved to type, which is unexpected, making local obj value unused:

Screenshot 2020-03-05 at 16 58 35

Without nameof it works as expected:

Screenshot 2020-03-05 at 17 07 17

When there's no matching type to resolve to is found, it also works as expected:

Screenshot 2020-03-05 at 16 58 44

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions