Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Function parameter names that also are PQ type names are incorrectly syntax highlighted #224

Open
bgribaudo opened this issue Mar 23, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bgribaudo
Copy link

In M, it is valid to name function parameters after M types, as parameter names will not be interpreted as type names when defining a function’s signature. However, syntax highlighting does not seem to make this distinction.

Expected behavior
In a function signature, parameters that have the same names as M types should be syntax highlighted the same as parameters with other names.

Actual behavior
Parameters with the same names as M types are highlighted differently.

Notice below how the red-underlined parameter names (which are identical to M type names) receive different syntax highlighting than the green-underlined one.
image

To Reproduce
In VSCode, create a Power Query file containing the following content:

(table as table, function as function, a as number) as any => ...
@bgribaudo bgribaudo added the bug Something isn't working label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants