blob: 7212fbc7367301e287ba4c61922606e685436ce1 [file] [log] [blame]
library;
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 dynamic) as{TypeError,ForDynamic} core::int;
if(!(let final dynamic #t2 = #t1 = #0#0 as 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";
}