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
{{ message }}
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
2 subst() calls within a single scope breaks compilation #810
The problem is that the regular expression creates the numbered match
variables automatically, and the second regular expression then conflicts
in the same scope as the first.
There are two issues:
1) the numbered matches are not referenced so they should not matter
2) as the argument to subst the scope is even smaller and they should not
be leaking into the calling scope
Thanks for the report!
On Sat, 17 Feb 2024, 00:51 EconomicTouristsArmLate, < ***@***.***> wrote:
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 <#693>
—
Reply to this email directly, view it on GitHub
<#810>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXFX62OEXZ5S7FD7YDTHIDYT5P7XAVCNFSM6AAAAABDMCKE52VHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZTQNRXGAZTAMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Activity
jaqx0r commentedon Feb 19, 2024
fix: allow multiple calls to ``subst`` with a regexp
fix: allow multiple calls to ``subst`` with a regexp
fix: allow multiple calls to ``subst`` with a regexp
fix: fix symbol checking and creation for ``subst`` with a regexp