4c1a94c0d3
This simplifies handle the constructor/member and its corresponding tearoff as a pair. Also it prepare for supporting tearoff of extension type constructors and methods with the same name. TEST=existing Change-Id: Iea6cbc0250c8df6bd0f825068c1f3e865d938427 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324202 Reviewed-by: Srujan Gaddam <srujzs@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jens Johansen <jensj@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
32 lines
962 B
Plaintext
32 lines
962 B
Plaintext
library;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
extension E on core::int {
|
|
static field constField = self::E|constField;
|
|
static field constField1 = self::E|constField1;
|
|
static field constField2 = self::E|constField2;
|
|
static method staticMethod = self::E|staticMethod;
|
|
method instanceMethod = self::E|instanceMethod;
|
|
method tearoff instanceMethod = self::E|get#instanceMethod;
|
|
}
|
|
@#C1
|
|
static const field core::int E|constField = #C1;
|
|
@#C2
|
|
static const field core::int E|constField1 = #C3;
|
|
@#C3
|
|
static const field core::int E|constField2 = #C2;
|
|
@#C1
|
|
static extension-member method E|staticMethod() → void {}
|
|
@#C1
|
|
static extension-member method E|instanceMethod(lowered final core::int #this) → void {}
|
|
static extension-member method E|get#instanceMethod(lowered final core::int #this) → () → void
|
|
return () → void => self::E|instanceMethod(#this);
|
|
static method main() → dynamic {}
|
|
|
|
constants {
|
|
#C1 = 1
|
|
#C2 = 3
|
|
#C3 = 2
|
|
}
|