[dslx] typeof / struct field type references
Open
dslx
enhancement
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
There should be a way to reference the type of a struct field. For example:
```
struct Foo {
bar: u3,
}
let foo: Foo = ...;
let bar: Foo::bar = foo.bar;
// bar has type u3
```
Without this feature, we often accidentally couple definitions to explicit types, and it's unreasonable IMO to ask people to create named type aliases for each and every field in a massive codebase.
Contributor guide
Assessment
This issue has not been assessed yet.