dslx should deduce function parametric from type of lhs of assignment expression
Open
dslx
enhancement
long-term-enhancement
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
It would be nice if dslx could deduce parametric function params from the type of left-hand, like in:
```
fn foo() -> uN[SZ] {
uN[SZ]:42
}
#[test]
fn foo_test() {
let foo42: u8 = foo();
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ TypeInferenceError: uN[SZ] Instantiated return type did not have all parametrics resolved.
assert_eq(foo42, u8:42);
}
```
Contributor guide
Assessment
This issue has not been assessed yet.