Skip to content
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

2 subst() calls within a single scope breaks compilation #810

Open
EconomicTouristsArmLate opened this issue Feb 16, 2024 · 1 comment
Open
Labels
mtail-Language/VM Issues related to the mtail language, compiler, or VM

Comments

@EconomicTouristsArmLate

Having 2 subst() calls within a single scope breaks with the error message:

Redeclaration of capture group `0' previously declared at apache2.access.mtail:63:20-24

This example works fine:

gauge foo by asdf
gauge bar by asdf
/(?P<asdf>.+)/ {
  foo[subst(/\d/, "", $asdf)]++
  /.+/ {
    bar[subst(/\d/, "", $asdf)]++
  }
}

while this throws the Redeclaration of capture group 0 error:

gauge foo by asdf
gauge bar by asdf
/(?P<asdf>.+)/ {
  foo[subst(/\d/, "", $asdf)]++
  bar[subst(/\d/, "", $asdf)]++
}

previous report: #693

@jaqx0r
Copy link
Contributor

jaqx0r commented Feb 19, 2024 via email

@jaqx0r jaqx0r added the mtail-Language/VM Issues related to the mtail language, compiler, or VM label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mtail-Language/VM Issues related to the mtail language, compiler, or VM
Projects
None yet
Development

No branches or pull requests

2 participants