Bad INVALID_ARGUMENT error on "size" to span for TIv2
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
**Describe the bug**
```
INVALID_ARGUMENT: TypeInferenceError: size mismatch: uN[...] at ... vs. u32 at ...
=== Source Location Trace: ===
third_party/xls/dslx/errors.cc:138
third_party/xls/dslx/type_system_v2/unify_type_annotations.cc:571
third_party/xls/dslx/type_system_v2/type_annotation_resolver.cc:351
third_party/xls/dslx/type_system_v2/type_annotation_resolver.cc:307
third_party/xls/dslx/type_system_v2/inference_table_converter_impl.cc:927
third_party/xls/dslx/type_system_v2/inference_table_converter_impl.cc:245
third_party/xls/dslx/type_system_v2/inference_table_converter_impl.cc:655
third_party/xls/dslx/type_system_v2/inference_table_converter_impl.cc:222
third_party/xls/dslx/type_system_v2/constant_collector.cc:527
third_party/xls/dslx/type_system_v2/inference_table_converter_impl.cc:988
third_party/xls/dslx/type_system_v2/inference_table_converter_impl.cc:245
third_party/xls/dslx/parse_and_typecheck.cc:137
: INVALID_ARGUMENT: Cannot convert string to span: "size"
=== Source Location Trace: ===
third_party/xls/dslx/frontend/pos.cc:62
third_party/xls/dslx/frontend/bindings.cc:76
```
**To Reproduce**
Not sure exactly; the code is not public, but hopefully the stack trace above is helpful.
**Expected behavior**
The `TypeInferenceError` seems reasonable, but I don't expect an error about "Cannot convert string to span".
Contributor guide
Assessment
This issue has not been assessed yet.