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:
16
test/wcc/data/r700_alias_union_arg/case.ww
Normal file
16
test/wcc/data/r700_alias_union_arg/case.ww
Normal file
@@ -0,0 +1,16 @@
|
||||
//ww:run-exit 107
|
||||
// Migrated from 700_e2e row 73.
|
||||
package main;
|
||||
type result = (i64 | i32);
|
||||
fn unwrap(r: result) i64 = {
|
||||
match (r) {
|
||||
case let v: i64 => return v;
|
||||
case let e: i32 => return e: i64;
|
||||
};
|
||||
return -1;
|
||||
};
|
||||
fn main() i32 = {
|
||||
let r1: result = 100;
|
||||
let r2: result = 7: i32;
|
||||
return (unwrap(r1) + unwrap(r2)): i32;
|
||||
};
|
||||
Reference in New Issue
Block a user