microsoft / powerquery-parser

A parser for the Power Query / M formula language, written in TypeScript
MIT License
111 stars 25 forks source link

[BUG] Quoted identifiers and unquoted identifiers sometimes parse differently #370

Open CurtHagenlocher opened 1 year ago

CurtHagenlocher commented 1 year ago

Expected behavior A quoted reference to an identifier which was defined as unquoted should be recognized as the same.

Actual behavior If you define an identifier without quotes and then reference it using the quoted form you get an error.

To Reproduce

shared SomeValue = 1; shared AnotherValue = #"SomeValue";

In the editor, #"SomeValue" gets a red squiggle and a tooltip of "Cannot find the name '#"SomeValue"', did you mean 'SomeValue'? powerquery(Error.UnknownIdentifier)".