let-bindings don't work with impl methods
Open
dslx
🧦 sox
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
Consider the following:
```
pub struct A { x: u32 }
pub impl A {
pub fn dump(self: Self) -> u32 { self.x }
}
pub fn main(a: A) -> u32 {
let to_dump = a.dump();
to_dump
}
```
This should typecheck, and it does if main instead directly returns `a.dump()` instead of binding to an intermediate. However, running `interpreter_main` gives a `BytecodeEmitter could not find slot or binding for name` error.
Contributor guide
Assessment
This issue has not been assessed yet.