google / google/xls

Detect pattern equivalence after constexpr evaluation

Open
#459 0 comments 0 reactions 0 assignees View on GitHub
dslx long-term-enhancement
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

We're about to introduce a (user requested) check for a syntactically redundant pattern (which indicates the user made a mistake, since the second syntactically-identical pattern match would never match, only the first). However, we could do better if we could compare patterns for equivalence after constexprs are resolved, would require a "are these patterns definitely matching identical things" helper, which we don't currently have. Right now this will be an opportunistic check we can implement quickly for some degree of checking help.

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.