blob: 3a419e7c8960024f2999089843d0e5bf2223610e [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
class A extends core::Object {
field core::int foo;
constructor •(core::int foo) self::A
: self::A::foo = foo, super core::Object::•()
;
get bar() core::int
return throw "Bye";
}
static method main() void {
self::A obj = new self::A::•(42);
core::int f = 1.{core::int::unary-}(){() core::int};
core::int b = 1.{core::int::unary-}(){() core::int};
try {
{
final synthesized self::A #0#0 = obj;
core::int #t1;
core::int #t2;
#t1 = #0#0.{self::A::foo}{core::int};
#t2 = #0#0.{self::A::bar}{core::int};
f = #t1;
b = #t2;
}
}
on core::Object catch(final core::Object _) {
}
self::expect(1.{core::int::unary-}(){() core::int}, f);
}
static method expect(dynamic expected, dynamic actual) dynamic {
if(!(expected =={core::Object::==}{(core::Object) core::bool} actual))
throw "Expected ${expected}, actual ${actual}";
}