Apparent parser sensitivity to the positioning of parametric impls
Open
dslx
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
Using this modified code example from a test in a pending type_system_v2 change:
```
struct S {}
struct T {}
fn f() -> u32 { N + 1 }
impl S {
const N_PLUS_1_VALUE = f();
}
impl T {
const N_PLUS_2_VALUE = f<{S::N_PLUS_1_VALUE}>();
}
```
When parsing the S impl, the parser appears to deal out a NameRef to N which points to the binding NameDef in T. However, if you move the S impl to immediately after the counterpart struct, it does the right thing.
Contributor guide
Assessment
This issue has not been assessed yet.