cli: canonicalize integer match patterns
Emit decimal AIR patterns without source suffixes, radix spellings or separators. Validate range before formatting and preserve duplicate-value detection, including negative zero and 128-bit boundaries. Add source run/reject regressions for canonical spelling, duplicates and out-of-range patterns; clarify the existing integer pattern contract.
This commit is contained in:
1 parent
1eaf968f4f
commit
fc23f1b23a
6 files changed
+51
-2
No files matched your search
@@ -0,0 +1,7 @@
|
||||
// expect: reject E7005
|
||||
// phase: 6
|
||||
// spec: docs/spec/15-source-language.md §6
|
||||
module test.integer_patterns
|
||||
fn main() -> u64 effects [] {
|
||||
return match 0u8 { -1 => { 42u64 }, _ => { 0u64 } };
|
||||
}
|
||||
Reference in new issue
Block a user