10000 String in sub expression incorrectly parsed · Issue #4543 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
String in sub expression incorrectly parsed #4543
@colinardo

Description

@colinardo

Hello everyone,
got a possible interpreter bug explained in detail first in the following forum
https://social.technet.microsoft.com/Forums/windowsserver/en-US/aeff1790-7e9a-4dfa-b35c-212a7f4b78b0/subexpression-with-additional-parentheses-string-inside-a-string-with-quotation-marks?forum=winserverpowershell

Steps to reproduce

Enter the following code in the console or in a script:

"$(')')" or "$('(')" or "$(")")" and so on.

Expected behavior

Should output a single closing parenthesis ) in the console

)

Actual behavior

Complains about missing parenthesis, although the parenthesis is enclosed in single quotation marks.
If you add an additional parenthesis so that the parethesis are balanced it's OK but this is not expected.

"$('()')"

Environment data

Could be reproduced in all Powershell-Versions up to the latest available.

Regards
colinardo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0