google / google/xls

DSLX: alias required for `::MAX` attribute on array-style bits types

Open
#711 0 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

With the soon-to-land attribute grammar you cannot write: `uN[128]::MAX`, you must make a type alias and take `::MAX` on that, e.g. `type MyU128 = uN[128]; MyU128::MAX`.

(Of course for all the types have a direct builtin name we _can_ take `::MAX` on those, e.g. `u32::MAX`)

This limitation could be lifted by expanding the grammar.

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.