blob: a2c1c56be9306faa3e55165e00e37dc968ad65db [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 core::int #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";
}
Extra constant evaluation status:
Evaluated: AsExpression @ org-dartlang-testcase:///issue51432.dart:7:26 -> StringConstant("The string!")
Extra constant evaluation: evaluated: 26, effectively constant: 1