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
Both the interpreter and linter are evaluating the right side of a set statement before performing type checking. In some cases this is accepting expressions that Fastly will reject.
For example assigning a conditional expression to a string variable is not valid but passes the type checking because the resulting bool value can be coerced to a string during assignment.
VCL code that cause the problem / reproduceable
The following VCL passes linting and will not cause an error in the interpreter.
Please fill all required sections
Kind of proposals
required
You can turn on multiple checkboxes.
Describe the problem
Both the interpreter and linter are evaluating the right side of a set statement before performing type checking. In some cases this is accepting expressions that Fastly will reject.
For example assigning a conditional expression to a string variable is not valid but passes the type checking because the resulting bool value can be coerced to a string during assignment.
VCL code that cause the problem / reproduceable
The following VCL passes linting and will not cause an error in the interpreter.
Expected behavior
Linter / interpreter should report an error.
Fiddle showing Fastly error for this case:
https://fiddle.fastly.dev/fiddle/b05aaad8
The text was updated successfully, but these errors were encountered: