-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
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