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 }}
Repository navigation
function names that start with colon have weird behavior with first non label compatible character #8908
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreWG-Languageparser, language semantics
function :hello" {} # allowed single double-quotefunction hello"" {} #required matching double-quotesfunction global::hello"" {} #also requires matching double quotesfunction :hello` more {} # error, 'more' was not expected.`function hello` more {} # works fine, function name is 'hello more'
Expected behavior
All to be consistent.
Actual behavior
It seems that some rules for labels are being applied to functions who's name token directly start with a colon, as the rules seem to match, such that any character that would fail as a label character just gets consumed in to the name with no regard to the rules of that character, such as the double-quote in the first statement above, or the backtick in the 4th statement.
I noticed this while trying to correct the PowerShell/EditorSyntax for function names, see PowerShell/EditorSyntax#156 for my work. I've noticed that a label can also be a function, and that is difficult to properly detect in a TM grammar, so I was double checking some of my matches when I noticed this, and at first thought I had the rules to function names wrong.
Environment data
Tested on 5.1 Windows PowerShell and 6.2 preview
Name Value
---- -----
PSVersion 6.2.0-preview.4
PSEdition Core
GitCommitId 6.2.0-preview.4
OS Microsoft Windows 10.0.18334
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreWG-Languageparser, language semantics
Activity
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.