blob: a790e525bf0e0bde28e06b3ca5c8dc7140367300 [file] [log] [blame]
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
static method method() dynamic {
core::int v1 = 42;
block {
core::int #t1;
final synthesized dynamic #0#0 = ("The string!" as{ForNonNullableByDefault} dynamic) as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
if(!(let final dynamic #t2 = #t1 = #0#0 as{ForNonNullableByDefault} core::int in true))
throw new core::StateError::•("Pattern matching error");
v1 = #t1;
} =>#0#0;
core::print(v1);
core::print(v1.{core::Object::runtimeType}{core::Type});
}
static method main() dynamic {
self::throws(() void => self::method());
}
static method throws(() void f) dynamic {
try {
f(){() void};
}
on core::Object catch(final core::Object e) {
core::print(e);
return;
}
throw "Missing exception";
}