blob: 25b4c85e2761750458dd1295707d39a21a8dab45 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
class C extends core::Object {
final field core::int value;
field core::String log = "";
constructor •(core::int value) self::C
: self::C::value = value, super core::Object::•()
;
method clearLog() void {
this.{self::C::log} = "";
}
operator >(core::num other) dynamic {
this.{self::C::log} = this.{self::C::log}{core::String}.{core::String::+}("C(${this.{self::C::value}{core::int}})>${other};"){(core::String) core::String};
return this.{self::C::value}{core::int}.{core::num::-}(other){(core::num) core::num};
}
}
static method test1(self::C c) core::String {
#L1:
{
final synthesized self::C #0#0 = c;
{
if(#0#0.{self::C::>}(#C1){(core::num) → dynamic} as core::bool) {
{
return "1";
}
}
}
{
{
{
return "no match";
}
}
}
}
}
static method main() dynamic {
self::C c1 = new self::C::•(0);
self::C c2 = new self::C::•(2);
self::throws(() void {
self::test1(c1);
});
}
static method throws(() void f) dynamic {
try {
f(){() void};
}
on core::Object catch(final core::Object e) {
core::print(e);
return;
}
throw "Missing exception";
}
constants {
#C1 = 1
}