google / google/xls

Confusing error with duplicate procs

Open
#1,119 1 comment 0 reactions 0 assignees View on GitHub
dslx
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Input:

```
proc foo {
config() { () }
init { () }
next(tok: token, state: ()) { {} }
}

proc foo {
init { () }
}
```

Error:

```
interpreter_main test.x
test.x:8:3-8:14
0006:
0007: proc foo {
0008: init { () }
~~~~~~~~^---------^ ParseError: Module `test` already contains a member named `foo.init` @ test.x:3:3-3:14
0009: }

```

Probably should error out on the duplicate proc declarations.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.