struct person { name: string };
fun foo(a, b: integer|string) {
r = a;
typecase b is integer {
r = r + b;
};
typecase b is person {
r = r + len(b);
};
r
}
main = fun() {
a = 0;
a = foo(a, 333 as integer|string);
a = foo(a, "hiya" as integer|string);
a /* should output 337 */
}