Skip to content

Bad INVALID_ARGUMENT error on "size" to span for TIv2 #3029

@mikex-oss

Description

@mikex-oss

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    dslxDSLX (domain specific language) implementation / front-enddslx:TIv2Bugs related to Type Inference v2

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions