google / google/xls

[dslx] typeof / struct field type references

Open
#868 2 comments 0 reactions 0 assignees View on GitHub
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

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.