The wwstage nodeisstr/nodeisslice recognizers were name-keyed for every non-local shape: an indirect fn-pointer callee ((*f)() — the errnotest #59.5 divergence, streq receiving a shifted register file) and module-global let/const idents (path.sepstr — union-widen pushes zero-filled len/cap) both fell to false while cstage keys off the checker stamp unconditionally. Both recognizers now fall back to the stamped n.type_; push and pop sites share them, so the drain stays balanced by construction. Graduates the #59.5 errnotest pin.
24 lines
451 B
Plaintext
24 lines
451 B
Plaintext
//ww:run
|
|
// A module-global const []u8 widened into a tagged-union call arg —
|
|
// the slice twin of globalconst_str_widen (path's const dot/dotdot
|
|
// shape).
|
|
package main;
|
|
|
|
const gb: []u8 = ['x', 'y', 'z'];
|
|
|
|
fn f(x: ([]u8 | i32)) i32 = {
|
|
match (x) {
|
|
case let s: []u8 => {
|
|
if (len(s) != 3) { return 1; };
|
|
if (s[2] != 122u8) { return 2; };
|
|
return 0;
|
|
};
|
|
case let v: i32 => { return 3; };
|
|
};
|
|
return 4;
|
|
};
|
|
|
|
fn main() i32 = {
|
|
return f(gb);
|
|
};
|