blob: 57f4848df440cf9ba2fe5c41e0f11b95cb56684c [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
static method test(dynamic x1, dynamic x2) dynamic {
{
hoisted dynamic y;
final synthesized dynamic #0#0 = x1;
if(let final dynamic #t1 = y = #0#0 in true) {
}
}
{
hoisted dynamic y;
final synthesized dynamic #1#0 = x1;
if(let final dynamic #t2 = y = #1#0 in true) {
{
hoisted dynamic y;
final synthesized dynamic #2#0 = x2;
if(let final dynamic #t3 = y = #2#0 in true) {
return y;
}
}
}
}
throw "Expected to never reach this line of the program.";
}
static method main() dynamic {
self::expectEquals(self::test(1, 2), 2);
}
static method expectEquals(dynamic x, dynamic y) dynamic {
if(!(x =={core::Object::==}{(core::Object) core::bool} y)) {
throw "Expected ${x} and ${y} to be equal.";
}
}