const patterns can't be used by themselves, need // prefix
Open
bug
mtail-Language/VM
- Dominant language
- Go
- Stars
- 4k
- Forks
- 392
- PR merge metrics
- No merged PRs in 30d
Description
When using a const by itself as a match condition, then we get warnings about
the capture group names not existing.
```
const A /(?.*)/
A {
x[$a]++
}
```
reports that `$a` not defined in scope.
A workaround is to prefix A with a // to force it into a locally evaluated pattern, which is weird:
```
// + A {
x[$a]++
}
```
Contributor guide
Assessment
This issue has not been assessed yet.