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
When changing scope to a new subroutine via call or a function expression the interpreter resets the re.group.# variables in the same way it does for local variables. This is not correctly following the behavior of Fastly.
Additionally accessing a re group variable before performing a regex match currently produces an undefined variable interpreter error instead of returning a NotSet value.
@ysugimoto A linter warning is a good idea. I updated #294 to include a fix for the interpreter since I was already moving around the subroutine state changes. Can make another PR that adds warning logic to the linter.
Kind of proposals
Describe the problem
When changing scope to a new subroutine via
call
or a function expression the interpreter resets there.group.#
variables in the same way it does for local variables. This is not correctly following the behavior of Fastly.Additionally accessing a re group variable before performing a regex match currently produces an undefined variable interpreter error instead of returning a
NotSet
value.VCL code that cause the problem / reproduceable
Expected behavior
https://fiddle.fastly.dev/fiddle/a3a1975b
The text was updated successfully, but these errors were encountered: