Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
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

Closed

Description

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

Activity

  1. jaqx0r commented on Feb 19, 2024

    @jaqx0r
    Contributor
  2. added
    mtail-Language/VM
    on Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mtail-Language/VM

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions