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:
19
test/wcc/data/r700_try_str_prop/case.ww
Normal file
19
test/wcc/data/r700_try_str_prop/case.ww
Normal file
@@ -0,0 +1,19 @@
|
||||
//ww:run-exit 4
|
||||
// Migrated from 700_e2e row 60.
|
||||
package main;
|
||||
fn try1(n: i64) (i64 | str) = {
|
||||
if (n < 0) { return "fail"; };
|
||||
return n;
|
||||
};
|
||||
fn try2(n: i64) (i64 | str) = {
|
||||
let v: i64 = try1(n)?;
|
||||
return v + 100;
|
||||
};
|
||||
fn main() i32 = {
|
||||
let r: (i64 | str) = try2(-1);
|
||||
match (r) {
|
||||
case let n: i64 => return n: i32;
|
||||
case let s: str => return s.len: i32;
|
||||
};
|
||||
return 0;
|
||||
};
|
||||
Reference in New Issue
Block a user