-
Notifications
You must be signed in to change notification settings - Fork 2
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
Additional bracket harms the parameter scope detection #403
Comments
Addendum: I move the additional opening curly bracket to the right (now placed between
This is accepted. No error. Value of But expected is a syntax error. |
Addendum: Again I move the additional opening curly bracket to the right (now placed between
Now that looks like the bracket belongs to the key name. Result:
Issues:
Two possibilities to react:
The same with an opening square bracket:
Result:
Yes, the key name is invalid. But the second part of the error message also. The empty square brackets error is a misdiagnosis and does not fit to the first part of the error message. |
In general: The detection of additional brackets at invalid positions within expressions should be strengthened. |
Full example:
Result:
|
Another invalid combination (again missing scope):
Result:
|
Within a composite data structure I overwrite the value of an existing parameter
"D"
in this way:${params}[1]['B'][0]['D'] : 11
This works like expected.
Now I make an error. I add an opening curly bracket after '
{params}
':${params}{[1]['B'][0]['D'] : 11
The error message is:
'Missing scope for parameter '${D}'. To change the value of this parameter, an absolute path must be used: '${params}[1]['B'][0]['D']' or '${params.1.B.0.D}'.'
Of course, the expression on the left hand side of the colon is invalid now. But the error message is much far away from reality.
Intuitively I would expect a syntax error. A detailed statement like a missing scope cannot be given in this case, because such a
statement would require a valid syntax of the expression.
Do we have any valid case where a parameter (
${params}
) can be followed by an opened curly bracket? I don't think so.Please try to rework the error handling in such cases.
The text was updated successfully, but these errors were encountered: