google / google/xls

[enhancement][dslx] For a width slice with a const immediate start position >= size, give a warning

Open
#2,351 1 comment 0 reactions 0 assignees View on GitHub
dslx dslx:type-checking enhancement
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

### What's hard to do? (limit 100 words)

Right now when imm is a u32 you can do imm[32 +: u32] and it will not flag that this is likely an error. This seems like a good warning to have in the DSLX warning set.

### Current best alternative workaround (limit 100 words)

Being cautious about this error pattern.

### Your view of the "best case XLS enhancement" (limit 100 words)

We give a warning for this case.

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.