mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[cfe] Allow null representation types in .call tear-offs
Closes https://github.com/dart-lang/sdk/issues/54768 Change-Id: I4624bdc7e02b79c174fa661f4bda7eb633673dea Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349502 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
This commit is contained in:
parent
a5bbbe814f
commit
d337c62c00
|
@ -796,31 +796,34 @@ abstract class InferenceVisitorBase implements InferenceVisitor {
|
|||
expressionType, callName, fileOffset,
|
||||
isSetter: false);
|
||||
|
||||
// Replace expression with:
|
||||
// `let t = expression in t == null ? null : t.call`
|
||||
VariableDeclaration t =
|
||||
new VariableDeclaration.forValue(expression, type: expressionType)
|
||||
..fileOffset = fileOffset;
|
||||
|
||||
// TODO(johnniwinther): Avoid null-check for non-nullable expressions.
|
||||
Expression nullCheck =
|
||||
new EqualsNull(new VariableGet(t)..fileOffset = fileOffset)
|
||||
..fileOffset = fileOffset;
|
||||
|
||||
DartType tearoffType = target.getGetterType(this);
|
||||
Expression tearOff;
|
||||
DartType tearoffType = target.getGetterType(this);
|
||||
switch (target.kind) {
|
||||
case ObjectAccessTargetKind.instanceMember:
|
||||
tearOff = new InstanceTearOff(
|
||||
InstanceAccessKind.Instance, new VariableGet(t), callName,
|
||||
interfaceTarget: target.member as Procedure,
|
||||
resultType: tearoffType)
|
||||
// TODO(johnniwinther): Avoid null-check for non-nullable expressions.
|
||||
|
||||
// Replace expression with:
|
||||
// `let t = expression in t == null ? null : t.call`
|
||||
VariableDeclaration t =
|
||||
new VariableDeclaration.forValue(expression, type: expressionType)
|
||||
..fileOffset = fileOffset;
|
||||
tearOff = new Let(
|
||||
t,
|
||||
new ConditionalExpression(
|
||||
new EqualsNull(new VariableGet(t)..fileOffset = fileOffset)
|
||||
..fileOffset = fileOffset,
|
||||
new NullLiteral()..fileOffset = fileOffset,
|
||||
new InstanceTearOff(
|
||||
InstanceAccessKind.Instance, new VariableGet(t), callName,
|
||||
interfaceTarget: target.member as Procedure,
|
||||
resultType: tearoffType)
|
||||
..fileOffset = fileOffset,
|
||||
tearoffType))
|
||||
..fileOffset = fileOffset;
|
||||
case ObjectAccessTargetKind.extensionTypeMember:
|
||||
tearOff = new StaticInvocation(
|
||||
target.tearoffTarget as Procedure,
|
||||
new Arguments([new VariableGet(t)],
|
||||
types: target.receiverTypeArguments)
|
||||
new Arguments([expression], types: target.receiverTypeArguments)
|
||||
..fileOffset = fileOffset)
|
||||
..fileOffset = fileOffset;
|
||||
case ObjectAccessTargetKind.extensionTypeRepresentation:
|
||||
|
@ -845,10 +848,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor {
|
|||
throw new UnsupportedError("Unexpected call tear-off $target.");
|
||||
}
|
||||
|
||||
ConditionalExpression conditional = new ConditionalExpression(nullCheck,
|
||||
new NullLiteral()..fileOffset = fileOffset, tearOff, tearoffType);
|
||||
return new TypedTearoff(
|
||||
tearoffType, new Let(t, conditional)..fileOffset = fileOffset);
|
||||
return new TypedTearoff(tearoffType, tearOff);
|
||||
}
|
||||
|
||||
/// Computes the assignability kind of [expressionType] to [contextType].
|
||||
|
|
|
@ -14,39 +14,39 @@ class D extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::Function
|
||||
return let final self::Ext /* = core::Function */ #t1 = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String}) in #t1 == null ?{() → core::String} null : self::Ext|get#call(#t1);
|
||||
return self::Ext|get#call(self::Ext|constructor#(let final self::C #t1 = new self::C::•() in #t1 == null ?{() → core::String} null : #t1.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t3 = new self::C::•() in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t4 = result in #t4 == null ?{() → core::String} null : self::Ext|get#call(#t4);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
get getter3() → core::Function
|
||||
return let final self::Ext2 /* = self::C */ #t5 = self::Ext2|constructor#(new self::C::•()) in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t3 = self::Ext2|constructor#(new self::C::•()) in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String};
|
||||
get getter4() → core::Function {
|
||||
self::Ext2 /* = self::C */ result = self::Ext2|constructor#(new self::C::•());
|
||||
return let final self::Ext2 /* = self::C */ #t6 = result in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t4 = result in #t4 == null ?{() → core::String} null : #t4.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method1<T extends self::C>(self::D::method1::T c) → core::Function {
|
||||
return let final self::D::method1::T #t7 = c in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
return let final self::D::method1::T #t5 = c in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::D::method2::T c) → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t8 = c in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t9 = result in #t9 == null ?{() → core::String} null : self::Ext|get#call(#t9);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t6 = c in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::Function {
|
||||
return let final self::Ext /* = core::Function */ #t10 = e in #t10 == null ?{() → core::String} null : self::Ext|get#call(#t10);
|
||||
return self::Ext|get#call(e);
|
||||
}
|
||||
method method4<T extends self::Ext2 /* = self::C */>(self::Ext2 /* = self::C */ e) → core::Function {
|
||||
return let final self::Ext2 /* = self::C */ #t11 = e in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t7 = e in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method5<T extends core::Object? = dynamic>(self::D::method5::T% c) → core::Function {
|
||||
if(c is self::C) {
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t12 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String};
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t8 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
method method6<T extends core::Object? = dynamic, S extends self::C>(self::D::method6::T% c) → core::Function {
|
||||
if(c is self::D::method6::S) {
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t13 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String};
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t9 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t9 == null ?{() → core::String} null : #t9.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ class E extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::String
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String}));
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t10 = new self::C::•() in #t10 == null ?{() → core::String} null : #t10.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t15 = new self::C::•() in #t15 == null ?{() → core::String} null : #t15.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t11 = new self::C::•() in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
get getter3() → core::String
|
||||
|
@ -71,7 +71,7 @@ class E extends core::Object {
|
|||
return c.{self::C::call}(){() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::E::method2::T c) → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t16 = c in #t16 == null ?{() → core::String} null : #t16.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t12 = c in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::String {
|
||||
|
@ -129,7 +129,7 @@ static method main() → void {
|
|||
core::print(d.{self::D::getter4}{core::Function}());
|
||||
core::print(d.{self::D::method1}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method2}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t17 = new self::C::•() in #t17 == null ?{() → core::String} null : #t17.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t13 = new self::C::•() in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::Function}());
|
||||
core::print(d.{self::D::method5}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
|
@ -140,7 +140,7 @@ static method main() → void {
|
|||
core::print(e.{self::E::getter4}{core::String});
|
||||
core::print(e.{self::E::method1}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method2}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t18 = new self::C::•() in #t18 == null ?{() → core::String} null : #t18.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::String});
|
||||
core::print(e.{self::E::method5}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::String});
|
||||
|
|
|
@ -14,39 +14,39 @@ class D extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::Function
|
||||
return let final self::Ext /* = core::Function */ #t1 = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String}) in #t1 == null ?{() → core::String} null : self::Ext|get#call(#t1);
|
||||
return self::Ext|get#call(self::Ext|constructor#(let final self::C #t1 = new self::C::•() in #t1 == null ?{() → core::String} null : #t1.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t3 = new self::C::•() in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t4 = result in #t4 == null ?{() → core::String} null : self::Ext|get#call(#t4);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
get getter3() → core::Function
|
||||
return let final self::Ext2 /* = self::C */ #t5 = self::Ext2|constructor#(new self::C::•()) in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t3 = self::Ext2|constructor#(new self::C::•()) in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String};
|
||||
get getter4() → core::Function {
|
||||
self::Ext2 /* = self::C */ result = self::Ext2|constructor#(new self::C::•());
|
||||
return let final self::Ext2 /* = self::C */ #t6 = result in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t4 = result in #t4 == null ?{() → core::String} null : #t4.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method1<T extends self::C>(self::D::method1::T c) → core::Function {
|
||||
return let final self::D::method1::T #t7 = c in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
return let final self::D::method1::T #t5 = c in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::D::method2::T c) → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t8 = c in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t9 = result in #t9 == null ?{() → core::String} null : self::Ext|get#call(#t9);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t6 = c in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::Function {
|
||||
return let final self::Ext /* = core::Function */ #t10 = e in #t10 == null ?{() → core::String} null : self::Ext|get#call(#t10);
|
||||
return self::Ext|get#call(e);
|
||||
}
|
||||
method method4<T extends self::Ext2 /* = self::C */>(self::Ext2 /* = self::C */ e) → core::Function {
|
||||
return let final self::Ext2 /* = self::C */ #t11 = e in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t7 = e in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method5<T extends core::Object? = dynamic>(self::D::method5::T% c) → core::Function {
|
||||
if(c is self::C) {
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t12 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String};
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t8 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
method method6<T extends core::Object? = dynamic, S extends self::C>(self::D::method6::T% c) → core::Function {
|
||||
if(c is self::D::method6::S) {
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t13 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String};
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t9 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t9 == null ?{() → core::String} null : #t9.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ class E extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::String
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String}));
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t10 = new self::C::•() in #t10 == null ?{() → core::String} null : #t10.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t15 = new self::C::•() in #t15 == null ?{() → core::String} null : #t15.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t11 = new self::C::•() in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
get getter3() → core::String
|
||||
|
@ -71,7 +71,7 @@ class E extends core::Object {
|
|||
return c.{self::C::call}(){() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::E::method2::T c) → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t16 = c in #t16 == null ?{() → core::String} null : #t16.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t12 = c in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::String {
|
||||
|
@ -129,7 +129,7 @@ static method main() → void {
|
|||
core::print(d.{self::D::getter4}{core::Function}());
|
||||
core::print(d.{self::D::method1}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method2}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t17 = new self::C::•() in #t17 == null ?{() → core::String} null : #t17.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t13 = new self::C::•() in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::Function}());
|
||||
core::print(d.{self::D::method5}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
|
@ -140,7 +140,7 @@ static method main() → void {
|
|||
core::print(e.{self::E::getter4}{core::String});
|
||||
core::print(e.{self::E::method1}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method2}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t18 = new self::C::•() in #t18 == null ?{() → core::String} null : #t18.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::String});
|
||||
core::print(e.{self::E::method5}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::String});
|
||||
|
|
|
@ -14,39 +14,39 @@ class D extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::Function
|
||||
return let final self::Ext /* = core::Function */ #t1 = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String}) in #t1 == null ?{() → core::String} null : self::Ext|get#call(#t1);
|
||||
return self::Ext|get#call(self::Ext|constructor#(let final self::C #t1 = new self::C::•() in #t1 == null ?{() → core::String} null : #t1.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t3 = new self::C::•() in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t4 = result in #t4 == null ?{() → core::String} null : self::Ext|get#call(#t4);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
get getter3() → core::Function
|
||||
return let final self::Ext2 /* = self::C */ #t5 = self::Ext2|constructor#(new self::C::•()) in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t3 = self::Ext2|constructor#(new self::C::•()) in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String};
|
||||
get getter4() → core::Function {
|
||||
self::Ext2 /* = self::C */ result = self::Ext2|constructor#(new self::C::•());
|
||||
return let final self::Ext2 /* = self::C */ #t6 = result in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t4 = result in #t4 == null ?{() → core::String} null : #t4.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method1<T extends self::C>(self::D::method1::T c) → core::Function {
|
||||
return let final self::D::method1::T #t7 = c in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
return let final self::D::method1::T #t5 = c in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::D::method2::T c) → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t8 = c in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t9 = result in #t9 == null ?{() → core::String} null : self::Ext|get#call(#t9);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t6 = c in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::Function {
|
||||
return let final self::Ext /* = core::Function */ #t10 = e in #t10 == null ?{() → core::String} null : self::Ext|get#call(#t10);
|
||||
return self::Ext|get#call(e);
|
||||
}
|
||||
method method4<T extends self::Ext2 /* = self::C */>(self::Ext2 /* = self::C */ e) → core::Function {
|
||||
return let final self::Ext2 /* = self::C */ #t11 = e in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t7 = e in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method5<T extends core::Object? = dynamic>(self::D::method5::T% c) → core::Function {
|
||||
if(c is self::C) {
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t12 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String};
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t8 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
method method6<T extends core::Object? = dynamic, S extends self::C>(self::D::method6::T% c) → core::Function {
|
||||
if(c is self::D::method6::S) {
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t13 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String};
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t9 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t9 == null ?{() → core::String} null : #t9.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ class E extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::String
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String}));
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t10 = new self::C::•() in #t10 == null ?{() → core::String} null : #t10.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t15 = new self::C::•() in #t15 == null ?{() → core::String} null : #t15.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t11 = new self::C::•() in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
get getter3() → core::String
|
||||
|
@ -71,7 +71,7 @@ class E extends core::Object {
|
|||
return c.{self::C::call}(){() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::E::method2::T c) → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t16 = c in #t16 == null ?{() → core::String} null : #t16.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t12 = c in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::String {
|
||||
|
@ -129,7 +129,7 @@ static method main() → void {
|
|||
core::print(d.{self::D::getter4}{core::Function}());
|
||||
core::print(d.{self::D::method1}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method2}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t17 = new self::C::•() in #t17 == null ?{() → core::String} null : #t17.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t13 = new self::C::•() in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::Function}());
|
||||
core::print(d.{self::D::method5}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
|
@ -140,7 +140,7 @@ static method main() → void {
|
|||
core::print(e.{self::E::getter4}{core::String});
|
||||
core::print(e.{self::E::method1}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method2}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t18 = new self::C::•() in #t18 == null ?{() → core::String} null : #t18.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::String});
|
||||
core::print(e.{self::E::method5}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::String});
|
||||
|
|
|
@ -14,39 +14,39 @@ class D extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::Function
|
||||
return let final self::Ext /* = core::Function */ #t1 = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String}) in #t1 == null ?{() → core::String} null : self::Ext|get#call(#t1);
|
||||
return self::Ext|get#call(self::Ext|constructor#(let final self::C #t1 = new self::C::•() in #t1 == null ?{() → core::String} null : #t1.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t3 = new self::C::•() in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t4 = result in #t4 == null ?{() → core::String} null : self::Ext|get#call(#t4);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
get getter3() → core::Function
|
||||
return let final self::Ext2 /* = self::C */ #t5 = self::Ext2|constructor#(new self::C::•()) in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t3 = self::Ext2|constructor#(new self::C::•()) in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String};
|
||||
get getter4() → core::Function {
|
||||
self::Ext2 /* = self::C */ result = self::Ext2|constructor#(new self::C::•());
|
||||
return let final self::Ext2 /* = self::C */ #t6 = result in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t4 = result in #t4 == null ?{() → core::String} null : #t4.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method1<T extends self::C>(self::D::method1::T c) → core::Function {
|
||||
return let final self::D::method1::T #t7 = c in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
return let final self::D::method1::T #t5 = c in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::D::method2::T c) → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t8 = c in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t9 = result in #t9 == null ?{() → core::String} null : self::Ext|get#call(#t9);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t6 = c in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::Function {
|
||||
return let final self::Ext /* = core::Function */ #t10 = e in #t10 == null ?{() → core::String} null : self::Ext|get#call(#t10);
|
||||
return self::Ext|get#call(e);
|
||||
}
|
||||
method method4<T extends self::Ext2 /* = self::C */>(self::Ext2 /* = self::C */ e) → core::Function {
|
||||
return let final self::Ext2 /* = self::C */ #t11 = e in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t7 = e in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method5<T extends core::Object? = dynamic>(self::D::method5::T% c) → core::Function {
|
||||
if(c is self::C) {
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t12 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String};
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t8 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
method method6<T extends core::Object? = dynamic, S extends self::C>(self::D::method6::T% c) → core::Function {
|
||||
if(c is self::D::method6::S) {
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t13 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String};
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t9 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t9 == null ?{() → core::String} null : #t9.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ class E extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::String
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String}));
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t10 = new self::C::•() in #t10 == null ?{() → core::String} null : #t10.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t15 = new self::C::•() in #t15 == null ?{() → core::String} null : #t15.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t11 = new self::C::•() in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
get getter3() → core::String
|
||||
|
@ -71,7 +71,7 @@ class E extends core::Object {
|
|||
return c.{self::C::call}(){() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::E::method2::T c) → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t16 = c in #t16 == null ?{() → core::String} null : #t16.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t12 = c in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::String {
|
||||
|
@ -129,7 +129,7 @@ static method main() → void {
|
|||
core::print(d.{self::D::getter4}{core::Function}());
|
||||
core::print(d.{self::D::method1}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method2}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t17 = new self::C::•() in #t17 == null ?{() → core::String} null : #t17.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t13 = new self::C::•() in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::Function}());
|
||||
core::print(d.{self::D::method5}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
|
@ -140,7 +140,7 @@ static method main() → void {
|
|||
core::print(e.{self::E::getter4}{core::String});
|
||||
core::print(e.{self::E::method1}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method2}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t18 = new self::C::•() in #t18 == null ?{() → core::String} null : #t18.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::String});
|
||||
core::print(e.{self::E::method5}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::String});
|
||||
|
|
|
@ -14,39 +14,39 @@ class D extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::Function
|
||||
return let final self::Ext /* = core::Function */ #t1 = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String}) in #t1 == null ?{() → core::String} null : self::Ext|get#call(#t1);
|
||||
return self::Ext|get#call(self::Ext|constructor#(let final self::C #t1 = new self::C::•() in #t1 == null ?{() → core::String} null : #t1.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t3 = new self::C::•() in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t4 = result in #t4 == null ?{() → core::String} null : self::Ext|get#call(#t4);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::C #t2 = new self::C::•() in #t2 == null ?{() → core::String} null : #t2.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
get getter3() → core::Function
|
||||
return let final self::Ext2 /* = self::C */ #t5 = self::Ext2|constructor#(new self::C::•()) in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t3 = self::Ext2|constructor#(new self::C::•()) in #t3 == null ?{() → core::String} null : #t3.{self::C::call}{() → core::String};
|
||||
get getter4() → core::Function {
|
||||
self::Ext2 /* = self::C */ result = self::Ext2|constructor#(new self::C::•());
|
||||
return let final self::Ext2 /* = self::C */ #t6 = result in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t4 = result in #t4 == null ?{() → core::String} null : #t4.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method1<T extends self::C>(self::D::method1::T c) → core::Function {
|
||||
return let final self::D::method1::T #t7 = c in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
return let final self::D::method1::T #t5 = c in #t5 == null ?{() → core::String} null : #t5.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::D::method2::T c) → core::Function {
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t8 = c in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String});
|
||||
return let final self::Ext /* = core::Function */ #t9 = result in #t9 == null ?{() → core::String} null : self::Ext|get#call(#t9);
|
||||
self::Ext /* = core::Function */ result = self::Ext|constructor#(let final self::D::method2::T #t6 = c in #t6 == null ?{() → core::String} null : #t6.{self::C::call}{() → core::String});
|
||||
return self::Ext|get#call(result);
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::Function {
|
||||
return let final self::Ext /* = core::Function */ #t10 = e in #t10 == null ?{() → core::String} null : self::Ext|get#call(#t10);
|
||||
return self::Ext|get#call(e);
|
||||
}
|
||||
method method4<T extends self::Ext2 /* = self::C */>(self::Ext2 /* = self::C */ e) → core::Function {
|
||||
return let final self::Ext2 /* = self::C */ #t11 = e in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String};
|
||||
return let final self::Ext2 /* = self::C */ #t7 = e in #t7 == null ?{() → core::String} null : #t7.{self::C::call}{() → core::String};
|
||||
}
|
||||
method method5<T extends core::Object? = dynamic>(self::D::method5::T% c) → core::Function {
|
||||
if(c is self::C) {
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t12 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String};
|
||||
return let final self::D::method5::T% & self::C /* '%' & '!' = '!' */ #t8 = c{self::D::method5::T% & self::C /* '%' & '!' = '!' */} in #t8 == null ?{() → core::String} null : #t8.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
method method6<T extends core::Object? = dynamic, S extends self::C>(self::D::method6::T% c) → core::Function {
|
||||
if(c is self::D::method6::S) {
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t13 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String};
|
||||
return let final self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */ #t9 = c{self::D::method6::T% & self::D::method6::S /* '%' & '!' = '!' */} in #t9 == null ?{() → core::String} null : #t9.{self::C::call}{() → core::String};
|
||||
}
|
||||
return () → Null => null;
|
||||
}
|
||||
|
@ -56,9 +56,9 @@ class E extends core::Object {
|
|||
: super core::Object::•()
|
||||
;
|
||||
get getter1() → core::String
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String}));
|
||||
return self::Ext|call(self::Ext|constructor#(let final self::C #t10 = new self::C::•() in #t10 == null ?{() → core::String} null : #t10.{self::C::call}{() → core::String}));
|
||||
get getter2() → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t15 = new self::C::•() in #t15 == null ?{() → core::String} null : #t15.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::C #t11 = new self::C::•() in #t11 == null ?{() → core::String} null : #t11.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
get getter3() → core::String
|
||||
|
@ -71,7 +71,7 @@ class E extends core::Object {
|
|||
return c.{self::C::call}(){() → core::String};
|
||||
}
|
||||
method method2<T extends self::C>(self::E::method2::T c) → core::String {
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t16 = c in #t16 == null ?{() → core::String} null : #t16.{self::C::call}{() → core::String}));
|
||||
core::String result = self::Ext|call(self::Ext|constructor#(let final self::E::method2::T #t12 = c in #t12 == null ?{() → core::String} null : #t12.{self::C::call}{() → core::String}));
|
||||
return result;
|
||||
}
|
||||
method method3<T extends self::Ext /* = core::Function */>(self::Ext /* = core::Function */ e) → core::String {
|
||||
|
@ -129,7 +129,7 @@ static method main() → void {
|
|||
core::print(d.{self::D::getter4}{core::Function}());
|
||||
core::print(d.{self::D::method1}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method2}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t17 = new self::C::•() in #t17 == null ?{() → core::String} null : #t17.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t13 = new self::C::•() in #t13 == null ?{() → core::String} null : #t13.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::Function}());
|
||||
core::print(d.{self::D::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::Function}());
|
||||
core::print(d.{self::D::method5}<self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
core::print(d.{self::D::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::Function}());
|
||||
|
@ -140,7 +140,7 @@ static method main() → void {
|
|||
core::print(e.{self::E::getter4}{core::String});
|
||||
core::print(e.{self::E::method1}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method2}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t18 = new self::C::•() in #t18 == null ?{() → core::String} null : #t18.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method3}<self::Ext /* = core::Function */>(self::Ext|constructor#(let final self::C #t14 = new self::C::•() in #t14 == null ?{() → core::String} null : #t14.{self::C::call}{() → core::String})){(self::Ext /* = core::Function */) → core::String});
|
||||
core::print(e.{self::E::method4}<self::Ext2 /* = self::C */>(self::Ext2|constructor#(new self::C::•())){(self::Ext2 /* = self::C */) → core::String});
|
||||
core::print(e.{self::E::method5}<self::C>(new self::C::•()){(self::C) → core::String});
|
||||
core::print(e.{self::E::method6}<self::C, self::C>(new self::C::•()){(self::C) → core::String});
|
||||
|
|
31
pkg/front_end/testcases/extension_types/issue54768.dart
Normal file
31
pkg/front_end/testcases/extension_types/issue54768.dart
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
extension type ET(Object? _) {
|
||||
String call() => "ET";
|
||||
}
|
||||
|
||||
Function func(Function callable) => callable;
|
||||
|
||||
void main() {
|
||||
ET et = ET(null);
|
||||
Expect.isTrue(func(et) is Function);
|
||||
Expect.isTrue(et.call is Function);
|
||||
Expect.equals(func(et)(), et.call());
|
||||
Expect.equals(func(et)(), "ET");
|
||||
}
|
||||
|
||||
class Expect {
|
||||
static void equals(x, y) {
|
||||
if (x != y) {
|
||||
throw "Expected two equal values, got '$x' and '$y'.";
|
||||
}
|
||||
}
|
||||
|
||||
static void isTrue(bool b) {
|
||||
if (!b) {
|
||||
throw "Expected condition to be true, but got false.";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Expect extends core::Object {
|
||||
synthetic constructor •() → self::Expect
|
||||
: super core::Object::•()
|
||||
;
|
||||
static method equals(dynamic x, dynamic y) → void {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected two equal values, got '${x}' and '${y}'.";
|
||||
}
|
||||
}
|
||||
static method isTrue(core::bool b) → void {
|
||||
if(!b) {
|
||||
throw "Expected condition to be true, but got false.";
|
||||
}
|
||||
}
|
||||
}
|
||||
extension type ET(core::Object? _) {
|
||||
abstract extension-type-member representation-field get _() → core::Object?;
|
||||
method call = self::ET|call;
|
||||
method tearoff call = self::ET|get#call;
|
||||
constructor • = self::ET|constructor#;
|
||||
constructor tearoff • = self::ET|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method ET|constructor#(core::Object? _) → self::ET /* = core::Object? */ {
|
||||
lowered final self::ET /* = core::Object? */ #this = _;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET|constructor#_#new#tearOff(core::Object? _) → self::ET /* = core::Object? */
|
||||
return self::ET|constructor#(_);
|
||||
static extension-type-member method ET|call(lowered final self::ET /* = core::Object? */ #this) → core::String
|
||||
return "ET";
|
||||
static extension-type-member method ET|get#call(lowered final self::ET /* = core::Object? */ #this) → () → core::String
|
||||
return () → core::String => self::ET|call(#this);
|
||||
static method func(core::Function callable) → core::Function
|
||||
return callable;
|
||||
static method main() → void {
|
||||
self::ET /* = core::Object? */ et = self::ET|constructor#(null);
|
||||
self::Expect::isTrue(self::func(self::ET|get#call(et)) is core::Function);
|
||||
self::Expect::isTrue(self::ET|get#call(et) is core::Function);
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), self::ET|call(et));
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), "ET");
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Expect extends core::Object {
|
||||
synthetic constructor •() → self::Expect
|
||||
: super core::Object::•()
|
||||
;
|
||||
static method equals(dynamic x, dynamic y) → void {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected two equal values, got '${x}' and '${y}'.";
|
||||
}
|
||||
}
|
||||
static method isTrue(core::bool b) → void {
|
||||
if(!b) {
|
||||
throw "Expected condition to be true, but got false.";
|
||||
}
|
||||
}
|
||||
}
|
||||
extension type ET(core::Object? _) {
|
||||
abstract extension-type-member representation-field get _() → core::Object?;
|
||||
method call = self::ET|call;
|
||||
method tearoff call = self::ET|get#call;
|
||||
constructor • = self::ET|constructor#;
|
||||
constructor tearoff • = self::ET|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method ET|constructor#(core::Object? _) → self::ET /* = core::Object? */ {
|
||||
lowered final self::ET /* = core::Object? */ #this = _;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET|constructor#_#new#tearOff(core::Object? _) → self::ET /* = core::Object? */
|
||||
return self::ET|constructor#(_);
|
||||
static extension-type-member method ET|call(lowered final self::ET /* = core::Object? */ #this) → core::String
|
||||
return "ET";
|
||||
static extension-type-member method ET|get#call(lowered final self::ET /* = core::Object? */ #this) → () → core::String
|
||||
return () → core::String => self::ET|call(#this);
|
||||
static method func(core::Function callable) → core::Function
|
||||
return callable;
|
||||
static method main() → void {
|
||||
self::ET /* = core::Object? */ et = self::ET|constructor#(null);
|
||||
self::Expect::isTrue(self::func(self::ET|get#call(et)) is core::Function);
|
||||
self::Expect::isTrue(self::ET|get#call(et) is core::Function);
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), self::ET|call(et));
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), "ET");
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
extension type ET(Object? _) {
|
||||
String call() => "ET";
|
||||
}
|
||||
|
||||
Function func(Function callable) => callable;
|
||||
|
||||
void main() {}
|
||||
|
||||
class Expect {
|
||||
static void equals(x, y) {}
|
||||
static void isTrue(bool b) {}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
Function func(Function callable) => callable;
|
||||
|
||||
class Expect {
|
||||
static void equals(x, y) {}
|
||||
static void isTrue(bool b) {}
|
||||
}
|
||||
|
||||
extension type ET(Object? _) {
|
||||
String call() => "ET";
|
||||
}
|
||||
|
||||
void main() {}
|
|
@ -0,0 +1,45 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Expect extends core::Object {
|
||||
synthetic constructor •() → self::Expect
|
||||
: super core::Object::•()
|
||||
;
|
||||
static method equals(dynamic x, dynamic y) → void {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected two equal values, got '${x}' and '${y}'.";
|
||||
}
|
||||
}
|
||||
static method isTrue(core::bool b) → void {
|
||||
if(!b) {
|
||||
throw "Expected condition to be true, but got false.";
|
||||
}
|
||||
}
|
||||
}
|
||||
extension type ET(core::Object? _) {
|
||||
abstract extension-type-member representation-field get _() → core::Object?;
|
||||
method call = self::ET|call;
|
||||
method tearoff call = self::ET|get#call;
|
||||
constructor • = self::ET|constructor#;
|
||||
constructor tearoff • = self::ET|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method ET|constructor#(core::Object? _) → self::ET /* = core::Object? */ {
|
||||
lowered final self::ET /* = core::Object? */ #this = _;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET|constructor#_#new#tearOff(core::Object? _) → self::ET /* = core::Object? */
|
||||
return self::ET|constructor#(_);
|
||||
static extension-type-member method ET|call(lowered final self::ET /* = core::Object? */ #this) → core::String
|
||||
return "ET";
|
||||
static extension-type-member method ET|get#call(lowered final self::ET /* = core::Object? */ #this) → () → core::String
|
||||
return () → core::String => self::ET|call(#this);
|
||||
static method func(core::Function callable) → core::Function
|
||||
return callable;
|
||||
static method main() → void {
|
||||
self::ET /* = core::Object? */ et = self::ET|constructor#(null);
|
||||
self::Expect::isTrue(self::func(self::ET|get#call(et)) is core::Function);
|
||||
self::Expect::isTrue(self::ET|get#call(et) is core::Function);
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), self::ET|call(et));
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), "ET");
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Expect extends core::Object {
|
||||
synthetic constructor •() → self::Expect
|
||||
: super core::Object::•()
|
||||
;
|
||||
static method equals(dynamic x, dynamic y) → void {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected two equal values, got '${x}' and '${y}'.";
|
||||
}
|
||||
}
|
||||
static method isTrue(core::bool b) → void {
|
||||
if(!b) {
|
||||
throw "Expected condition to be true, but got false.";
|
||||
}
|
||||
}
|
||||
}
|
||||
extension type ET(core::Object? _) {
|
||||
abstract extension-type-member representation-field get _() → core::Object?;
|
||||
method call = self::ET|call;
|
||||
method tearoff call = self::ET|get#call;
|
||||
constructor • = self::ET|constructor#;
|
||||
constructor tearoff • = self::ET|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method ET|constructor#(core::Object? _) → self::ET /* = core::Object? */ {
|
||||
lowered final self::ET /* = core::Object? */ #this = _;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET|constructor#_#new#tearOff(core::Object? _) → self::ET /* = core::Object? */
|
||||
return self::ET|constructor#(_);
|
||||
static extension-type-member method ET|call(lowered final self::ET /* = core::Object? */ #this) → core::String
|
||||
return "ET";
|
||||
static extension-type-member method ET|get#call(lowered final self::ET /* = core::Object? */ #this) → () → core::String
|
||||
return () → core::String => self::ET|call(#this);
|
||||
static method func(core::Function callable) → core::Function
|
||||
return callable;
|
||||
static method main() → void {
|
||||
self::ET /* = core::Object? */ et = self::ET|constructor#(null);
|
||||
self::Expect::isTrue(self::func(self::ET|get#call(et)) is core::Function);
|
||||
self::Expect::isTrue(self::ET|get#call(et) is core::Function);
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), self::ET|call(et));
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), "ET");
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Expect extends core::Object {
|
||||
synthetic constructor •() → self::Expect
|
||||
;
|
||||
static method equals(dynamic x, dynamic y) → void
|
||||
;
|
||||
static method isTrue(core::bool b) → void
|
||||
;
|
||||
}
|
||||
extension type ET(core::Object? _) {
|
||||
abstract extension-type-member representation-field get _() → core::Object?;
|
||||
method call = self::ET|call;
|
||||
method tearoff call = self::ET|get#call;
|
||||
constructor • = self::ET|constructor#;
|
||||
constructor tearoff • = self::ET|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method ET|constructor#(core::Object? _) → self::ET /* = core::Object? */
|
||||
;
|
||||
static extension-type-member method ET|constructor#_#new#tearOff(core::Object? _) → self::ET /* = core::Object? */
|
||||
return self::ET|constructor#(_);
|
||||
static extension-type-member method ET|call(lowered final self::ET /* = core::Object? */ #this) → core::String
|
||||
;
|
||||
static extension-type-member method ET|get#call(lowered final self::ET /* = core::Object? */ #this) → () → core::String
|
||||
return () → core::String => self::ET|call(#this);
|
||||
static method func(core::Function callable) → core::Function
|
||||
;
|
||||
static method main() → void
|
||||
;
|
|
@ -0,0 +1,45 @@
|
|||
library;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
class Expect extends core::Object {
|
||||
synthetic constructor •() → self::Expect
|
||||
: super core::Object::•()
|
||||
;
|
||||
static method equals(dynamic x, dynamic y) → void {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected two equal values, got '${x}' and '${y}'.";
|
||||
}
|
||||
}
|
||||
static method isTrue(core::bool b) → void {
|
||||
if(!b) {
|
||||
throw "Expected condition to be true, but got false.";
|
||||
}
|
||||
}
|
||||
}
|
||||
extension type ET(core::Object? _) {
|
||||
abstract extension-type-member representation-field get _() → core::Object?;
|
||||
method call = self::ET|call;
|
||||
method tearoff call = self::ET|get#call;
|
||||
constructor • = self::ET|constructor#;
|
||||
constructor tearoff • = self::ET|constructor#_#new#tearOff;
|
||||
}
|
||||
static extension-type-member method ET|constructor#(core::Object? _) → self::ET /* = core::Object? */ {
|
||||
lowered final self::ET /* = core::Object? */ #this = _;
|
||||
return #this;
|
||||
}
|
||||
static extension-type-member method ET|constructor#_#new#tearOff(core::Object? _) → self::ET /* = core::Object? */
|
||||
return self::ET|constructor#(_);
|
||||
static extension-type-member method ET|call(lowered final self::ET /* = core::Object? */ #this) → core::String
|
||||
return "ET";
|
||||
static extension-type-member method ET|get#call(lowered final self::ET /* = core::Object? */ #this) → () → core::String
|
||||
return () → core::String => self::ET|call(#this);
|
||||
static method func(core::Function callable) → core::Function
|
||||
return callable;
|
||||
static method main() → void {
|
||||
self::ET /* = core::Object? */ et = self::ET|constructor#(null);
|
||||
self::Expect::isTrue(self::func(self::ET|get#call(et)) is core::Function);
|
||||
self::Expect::isTrue(self::ET|get#call(et) is core::Function);
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), self::ET|call(et));
|
||||
self::Expect::equals(self::func(self::ET|get#call(et))(), "ET");
|
||||
}
|
Loading…
Reference in a new issue