blob: f0f56cd2331f442798c07ba2cc5ea6fb18e596de [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}";
}
Extra constant evaluation status:
Evaluated: InstanceInvocation @ org-dartlang-testcase:///issue51861.dart:13:11 -> IntConstant(-1)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///issue51861.dart:14:11 -> IntConstant(-1)
Evaluated: InstanceInvocation @ org-dartlang-testcase:///issue51861.dart:18:10 -> IntConstant(-1)
Extra constant evaluation: evaluated: 27, effectively constant: 3