test: migrate 700_e2e rows to corpus fixtures; retire the carrier
136 rows migrated, 0 already owned, 3 wwstage-failing rows held out.
This commit is contained in:
15
test/wcc/data/r700_match_yield_str/case.ww
Normal file
15
test/wcc/data/r700_match_yield_str/case.ww
Normal file
@@ -0,0 +1,15 @@
|
||||
//ww:run-exit 103
|
||||
// Migrated from 700_e2e row 65.
|
||||
package main;
|
||||
fn pick(b: bool) (i32 | str) = {
|
||||
if (b) { return 7; };
|
||||
return "abc";
|
||||
};
|
||||
fn main() i32 = {
|
||||
let r: (i32 | str) = pick(false);
|
||||
let v: i32 = match (r) {
|
||||
case let n: i32 => yield n + 1;
|
||||
case let s: str => yield s.len: i32 + 100;
|
||||
};
|
||||
return v;
|
||||
};
|
||||
Reference in New Issue
Block a user