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_error_alias_str/case.ww
Normal file
16
test/wcc/data/r700_error_alias_str/case.ww
Normal file
@@ -0,0 +1,16 @@
|
||||
//ww:run-exit 3
|
||||
// Migrated from 700_e2e row 71.
|
||||
package main;
|
||||
type error = str;
|
||||
fn read(n: i64) (i64 | error) = {
|
||||
if (n < 0) { return "eof": error; };
|
||||
return n + 1;
|
||||
};
|
||||
fn main() i32 = {
|
||||
let r: (i64 | error) = read(-1);
|
||||
match (r) {
|
||||
case let v: i64 => return v: i32;
|
||||
case let e: error => return e.len: i32;
|
||||
};
|
||||
return 0;
|
||||
};
|
||||
Reference in New Issue
Block a user