3d19493f2d
+ add predicate helpers to identify these and extract their original names. TEST=pkg/front_end/test/predicates/predicate_test.dart Change-Id: I4d94c575d010b6b01c985eaf5392b9e0e979d044 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175250 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jens Johansen <jensj@google.com>
70 lines
2.2 KiB
Plaintext
70 lines
2.2 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
import "dart:_internal" as _in;
|
|
|
|
class C extends core::Object {
|
|
static field dynamic _#s = null;
|
|
static field core::bool _#s#isSet = false;
|
|
field dynamic _#C#v = null;
|
|
field core::bool _#C#v#isSet = false;
|
|
synthetic constructor •() → self::C
|
|
: super core::Object::•()
|
|
;
|
|
static get s() → dynamic
|
|
return self::C::_#s#isSet ?{dynamic} self::C::_#s : throw new _in::LateError::fieldNI("s");
|
|
static set s(dynamic #t1) → void
|
|
if(self::C::_#s#isSet)
|
|
throw new _in::LateError::fieldAI("s");
|
|
else {
|
|
self::C::_#s#isSet = true;
|
|
self::C::_#s = #t1;
|
|
}
|
|
get v() → dynamic
|
|
return this.{self::C::_#C#v#isSet} ?{dynamic} this.{self::C::_#C#v} : throw new _in::LateError::fieldNI("v");
|
|
set v(dynamic #t2) → void
|
|
if(this.{self::C::_#C#v#isSet})
|
|
throw new _in::LateError::fieldAI("v");
|
|
else {
|
|
this.{self::C::_#C#v#isSet} = true;
|
|
this.{self::C::_#C#v} = #t2;
|
|
}
|
|
}
|
|
static field dynamic _#g = null;
|
|
static field core::bool _#g#isSet = false;
|
|
static get g() → dynamic
|
|
return self::_#g#isSet ?{dynamic} self::_#g : throw new _in::LateError::fieldNI("g");
|
|
static set g(dynamic #t3) → void
|
|
if(self::_#g#isSet)
|
|
throw new _in::LateError::fieldAI("g");
|
|
else {
|
|
self::_#g#isSet = true;
|
|
self::_#g = #t3;
|
|
}
|
|
static method main() → dynamic {
|
|
lowered final dynamic #l;
|
|
lowered core::bool #l#isSet = false;
|
|
function #l#get() → dynamic
|
|
return #l#isSet ?{dynamic} #l : throw new _in::LateError::localNI("l");
|
|
function #l#set(dynamic #t4) → dynamic
|
|
if(#l#isSet)
|
|
throw new _in::LateError::localAI("l");
|
|
else {
|
|
#l#isSet = true;
|
|
return #l = #t4;
|
|
}
|
|
self::g = "Lily";
|
|
self::C::s = "was";
|
|
self::C c = new self::C::•();
|
|
c.{self::C::v} = "here";
|
|
#l#set.call("Run, Forrest, run");
|
|
self::expect("Lily", self::g);
|
|
self::expect("was", self::C::s);
|
|
self::expect("here", c.{self::C::v});
|
|
self::expect("Run, Forrest, run", #l#get.call());
|
|
}
|
|
static method expect(dynamic expected, dynamic actual) → dynamic {
|
|
if(!expected.{core::Object::==}(actual))
|
|
throw "Expected ${expected}, actual ${actual}";
|
|
}
|