blob: b41cbe4b04d859666a6a05600ed56b8bdd4bcdda [file]
//
// Problems in component:
//
// pkg/front_end/testcases/general/dynamic_modules/main_lib1.dart:191:7: Error: Cannot expose class 'C19' because it declares or inherits a 'noSuchMethod' declaration.
// Try removing the 'noSuchMethod' declaration or not exposing the class.
// class C19 {
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main_lib1.dart:201:7: Error: Cannot expose class 'C21' because it declares or inherits a 'noSuchMethod' declaration.
// Try removing the 'noSuchMethod' declaration or not exposing the class.
// class C21 extends C20 {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:13:7: Error: Cannot extend, implement or mix-in class 'C3' in a dynamic module.
// Try removing the reference to class 'C3' or update the dynamic interface to list class 'C3' as extendable.
// class D3 extends C3 {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart: Error: Cannot invoke constructor 'C3' from a dynamic module.
// Try removing the call or update the dynamic interface to list constructor 'C3' as callable.
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:22:12: Error: Cannot override member 'C4.field1' in a dynamic module.
// Try removing the override or update the dynamic interface to list member 'C4.field1' as can-be-overridden.
// int? get field1 => null;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:18:8: Error: Cannot override member 'C4.method1' in a dynamic module.
// Try removing the override or update the dynamic interface to list member 'C4.method1' as can-be-overridden.
// void method1() {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:23:7: Error: Cannot override member 'C4.field1' in a dynamic module.
// Try removing the override or update the dynamic interface to list member 'C4.field1' as can-be-overridden.
// set field1(int? value) {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:30:7: Error: Cannot extend, implement or mix-in class 'C3' in a dynamic module.
// Try removing the reference to class 'C3' or update the dynamic interface to list class 'C3' as extendable.
// class E3 implements C3 {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:39:8: Error: Cannot override member 'C4.field1' in a dynamic module.
// Try removing the override or update the dynamic interface to list member 'C4.field1' as can-be-overridden.
// int? field1;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:35:8: Error: Cannot override member 'C4.method1' in a dynamic module.
// Try removing the override or update the dynamic interface to list member 'C4.method1' as can-be-overridden.
// void method1() {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main_lib1.dart:49:8: Error: Cannot override member 'Interface.foo' in a dynamic module.
// Try removing the override or update the dynamic interface to list member 'Interface.foo' as can-be-overridden.
// void foo() {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main_lib1.dart:57:8: Error: Cannot override member 'Interface.foo' in a dynamic module.
// Try removing the override or update the dynamic interface to list member 'Interface.foo' as can-be-overridden.
// void foo() {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart: Error: Cannot use class '_ConstForC6' in a dynamic module.
// Try removing the reference to class '_ConstForC6' or update the dynamic interface to list class '_ConstForC6' as callable.
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart: Error: Cannot invoke member '_privateMethodForC6' from a dynamic module.
// Try removing the call or update the dynamic interface to list member '_privateMethodForC6' as callable.
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart: Error: Cannot use class '_ConstForC6' as a type in a dynamic module.
// Try removing the reference to class '_ConstForC6' or update the dynamic interface to list class '_ConstForC6' as can-be-used-as-type.
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:292:7: Error: Cannot define 'noSuchMethod' on 'Lib5WithNSM' because it is a subtype of 'Lib5C1', which was exposed as dynamically-callable.
// Try removing the 'noSuchMethod' declaration or no longer expose 'Lib5C1' as dynamically-callable.
// class Lib5WithNSM extends Lib5C1 {
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:45:7: Error: Cannot extend, implement or mix-in class 'M1' in a dynamic module.
// Try removing the reference to class 'M1' or update the dynamic interface to list class 'M1' as extendable.
// class F1 with M1 {}
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart: Warning: Dynamic calls are discouraged in dynamic modules as they may fail at runtime if their target is not properly exposed as 'dynamically-callable'.
// Consider avoiding dynamic calls. You can remove '--allow-dynamic-calls-in-dynamic-modules' to see where dynamic calls are used.
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:70:15: Error: Dynamic call to selector 'set:baz' is not allowed in a dynamic module.
// Try listing 'set:baz' as 'dynamically-callable' in the dynamic interface specification.
// x.foo().bar.baz = 42;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:70:11: Error: Dynamic call to selector 'get:bar' is not allowed in a dynamic module.
// Try listing 'get:bar' as 'dynamically-callable' in the dynamic interface specification.
// x.foo().bar.baz = 42;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:70:5: Error: Dynamic call to selector 'foo' is not allowed in a dynamic module.
// Try listing 'foo' as 'dynamically-callable' in the dynamic interface specification.
// x.foo().bar.baz = 42;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:71:14: Error: Dynamic call to selector '<' is not allowed in a dynamic module.
// Try listing '<' as 'dynamically-callable' in the dynamic interface specification.
// if (x case < 3) {
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:75:21: Error: Dynamic call to selector 'get:foo' is not allowed in a dynamic module.
// Try listing 'get:foo' as 'dynamically-callable' in the dynamic interface specification.
// case dynamic(foo: 42):
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:81:6: Error: Cannot use class 'C1' as a type in a dynamic module.
// Try removing the reference to class 'C1' or update the dynamic interface to list class 'C1' as can-be-used-as-type.
// C1 o1 = C1();
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:81:11: Error: Cannot invoke constructor 'C1' from a dynamic module.
// Try removing the call or update the dynamic interface to list constructor 'C1' as callable.
// C1 o1 = C1();
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:82:6: Error: Cannot invoke member 'C1.method1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.method1' as callable.
// o1.method1();
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:83:12: Error: Cannot invoke member 'C1.method1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.method1' as callable.
// print(o1.method1);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:84:12: Error: Cannot invoke member 'C1.getter1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.getter1' as callable.
// print(o1.getter1);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:85:6: Error: Cannot invoke member 'C1.setter1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.setter1' as callable.
// o1.setter1 = 42;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:86:6: Error: Cannot invoke member 'C1.method2' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.method2' as callable.
// C1.method2();
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:87:12: Error: Cannot invoke member 'C1.method2' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.method2' as callable.
// print(C1.method2);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:88:12: Error: Cannot invoke member 'C1.getter2' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.getter2' as callable.
// print(C1.getter2);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:89:6: Error: Cannot invoke member 'C1.setter2' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.setter2' as callable.
// C1.setter2 = 42;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:90:9: Error: Cannot invoke constructor 'C1' from a dynamic module.
// Try removing the call or update the dynamic interface to list constructor 'C1' as callable.
// print(C1.new);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:91:12: Error: Cannot invoke member 'C1.field1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.field1' as callable.
// print(o1.field1);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:92:12: Error: Cannot invoke member 'C1.field2' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C1.field2' as callable.
// print(C1.field2);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:109:3: Error: Cannot invoke member 'method1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'method1' as callable.
// method1();
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:110:9: Error: Cannot invoke member 'method1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'method1' as callable.
// print(method1);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:117:9: Error: Cannot invoke member 'field1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'field1' as callable.
// print(field1);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:118:3: Error: Cannot invoke member 'field1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'field1' as callable.
// field1 = 42;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:126:12: Error: Cannot invoke member 'C8.fact1' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C8.fact1' as callable.
// print(C8.fact1());
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:127:12: Error: Cannot invoke member 'C8.fact2' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C8.fact2' as callable.
// print(C8.fact2());
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:128:15: Error: Cannot invoke member 'C8.fact4' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'C8.fact4' as callable.
// print(const C8.fact4());
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:136:9: Error: Cannot use extension type 'ExtType1' as a type in a dynamic module.
// Try removing the reference to extension type 'ExtType1' or update the dynamic interface to list extension type 'ExtType1' as can-be-used-as-type.
// print(ExtType1);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:137:9: Error: Cannot invoke member 'ExtType1.new' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'ExtType1.new' as callable.
// print(ExtType1(42));
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:138:12: Error: Cannot invoke member 'Ext1.isPositive' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'Ext1.isPositive' as callable.
// print(42.isPositive);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:158:17: Error: Cannot invoke member 'Ext1.isPositive' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'Ext1.isPositive' as callable.
// print(Ext1(1).isPositive);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:167:9: Error: Cannot use extension type 'ExtType5' as a type in a dynamic module.
// Try removing the reference to extension type 'ExtType5' or update the dynamic interface to list extension type 'ExtType5' as can-be-used-as-type.
// print(ExtType5);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:173:27: Error: Cannot invoke member 'ExtType5.isPositive' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'ExtType5.isPositive' as callable.
// print(ExtType5.plus1(3).isPositive);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:236:9: Error: Cannot invoke constructor 'C10' from a dynamic module.
// Try removing the call or update the dynamic interface to list constructor 'C10' as callable.
// print(C10());
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:237:9: Error: Cannot invoke member 'ExtType10.new' from a dynamic module.
// Try removing the call or update the dynamic interface to list member 'ExtType10.new' as callable.
// print(ExtType10(20));
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:240:5: Error: Cannot use class 'C13' as a type in a dynamic module.
// Try removing the reference to class 'C13' or update the dynamic interface to list class 'C13' as can-be-used-as-type.
// o is C13;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:241:5: Error: Cannot use class 'C13' as a type in a dynamic module.
// Try removing the reference to class 'C13' or update the dynamic interface to list class 'C13' as can-be-used-as-type.
// o as C13;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:242:13: Error: Cannot use class 'C13' as a type in a dynamic module.
// Try removing the reference to class 'C13' or update the dynamic interface to list class 'C13' as can-be-used-as-type.
// List<C13> list9;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:243:9: Error: Cannot use class 'C13' as a type in a dynamic module.
// Try removing the reference to class 'C13' or update the dynamic interface to list class 'C13' as can-be-used-as-type.
// print(C13);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:244:14: Error: Cannot use class 'C13' as a type in a dynamic module.
// Try removing the reference to class 'C13' or update the dynamic interface to list class 'C13' as can-be-used-as-type.
// print(<C13>[]);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:245:20: Error: Cannot use extension type 'ExtType13' as a type in a dynamic module.
// Try removing the reference to extension type 'ExtType13' or update the dynamic interface to list extension type 'ExtType13' as can-be-used-as-type.
// print(<ExtType13>[]);
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:248:9: Error: Cannot use class 'C14' as a type in a dynamic module.
// Try removing the reference to class 'C14' or update the dynamic interface to list class 'C14' as can-be-used-as-type.
// final inferredList = [C15(), C16()];
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:248:24: Error: Cannot use class 'C14' as a type in a dynamic module.
// Try removing the reference to class 'C14' or update the dynamic interface to list class 'C14' as can-be-used-as-type.
// final inferredList = [C15(), C16()];
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:266:5: Error: Dynamic call to selector 'set:dcField1' is not allowed in a dynamic module.
// Try listing 'set:dcField1' as 'dynamically-callable' in the dynamic interface specification.
// x.dcField1 = 42;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:282:5: Error: Dynamic call to selector 'get:notAllowedGetter' is not allowed in a dynamic module.
// Try listing 'get:notAllowedGetter' as 'dynamically-callable' in the dynamic interface specification.
// x.notAllowedGetter;
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:283:5: Error: Dynamic call to selector 'notAllowedMethod' is not allowed in a dynamic module.
// Try listing 'notAllowedMethod' as 'dynamically-callable' in the dynamic interface specification.
// x.notAllowedMethod();
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:284:5: Error: Dynamic call to selector 'allowedGetter' is not allowed in a dynamic module.
// Try listing 'allowedGetter' as 'dynamically-callable' in the dynamic interface specification.
// x.allowedGetter(); // not meant to be called
// ^
//
// pkg/front_end/testcases/general/dynamic_modules/main.dart:285:5: Error: Dynamic call to selector 'get:allowedSetter' is not allowed in a dynamic module.
// Try listing 'get:allowedSetter' as 'dynamically-callable' in the dynamic interface specification.
// x.allowedSetter; // not meant to be used as getter
// ^
//
library;
import self as self;
import "main_lib1.dart" as mai;
import "dart:core" as core;
import "main_lib5.dart" as mai2;
import "main_lib3.dart" as mai3;
import "main_lib4.dart" as mai4;
import "org-dartlang-testcase:///main_lib1.dart";
import "org-dartlang-testcase:///main_lib2.dart";
import "org-dartlang-testcase:///main_lib4.dart";
import "org-dartlang-testcase:///main_lib5.dart";
class D3 extends mai::C3 {
synthetic constructor •() self::D3
: super mai::C3::•()
;
}
class D4 extends mai::C4 {
synthetic constructor •() self::D4
: super mai::C4::•()
;
method method1() void {}
method method2() void {}
get field1() core::int?
return null;
set field1(core::int? value) void {}
get field2() core::int?
return null;
set field2(core::int? value) void {}
}
class E3 extends core::Object implements mai::C3 {
synthetic constructor •() self::E3
: super core::Object::•()
;
}
class E4 extends core::Object implements mai::C4 {
field core::int? field1 = null;
field core::int? field2 = null;
synthetic constructor •() self::E4
: super core::Object::•()
;
method method1() void {}
method method2() void {}
}
class F1 extends self::_F1&Object&M1 {
synthetic constructor •() self::F1
: super self::_F1&Object&M1::•()
;
}
class F2 extends self::_F2&Object&M2 {
synthetic constructor •() self::F2
: super self::_F2&Object&M2::•()
;
}
class Impl1 extends mai::Base implements mai::Interface {
synthetic constructor •() self::Impl1
: super mai::Base::•()
;
}
class Impl2 extends self::_Impl2&Object&Mixin implements mai::Interface {
synthetic constructor •() self::Impl2
: super self::_Impl2&Object&Mixin::•()
;
}
class C6Ext extends mai::C6 {
constructor •({super-initializing-formal core::Object param = #C2}) → self::C6Ext
: super mai::C6::•(param: param)
;
}
class C7Ext extends mai::C7 {
constructor •({super-initializing-formal core::Object param = #C4}) → self::C7Ext
: super mai::C7::•(param: param)
;
}
class Lib5WithNSM extends mai2::Lib5C1 {
synthetic constructor •() self::Lib5WithNSM
: super mai2::Lib5C1::•()
;
@#C5
method noSuchMethod(core::Invocation invocation) dynamic
return super.{core::Object::noSuchMethod}(invocation);
}
class C26WithM3 extends self::_C26WithM3&C26&M3 {
synthetic constructor •() self::C26WithM3
: super self::_C26WithM3&C26&M3::•()
;
}
abstract class _F1&Object&M1 = core::Object with mai::M1 /*isAnonymousMixin,hasConstConstructor*/ {
const synthetic constructor •() self::_F1&Object&M1
: super core::Object::•()
;
}
abstract class _F2&Object&M2 = core::Object with mai::M2 /*isAnonymousMixin,hasConstConstructor*/ {
const synthetic constructor •() self::_F2&Object&M2
: super core::Object::•()
;
}
abstract class _Impl2&Object&Mixin = core::Object with mai::Mixin /*isAnonymousMixin,hasConstConstructor*/ {
const synthetic constructor •() self::_Impl2&Object&Mixin
: super core::Object::•()
;
synthetic mixin-super-stub method foo() void
return super.{mai::Mixin::foo}();
}
abstract class _C26WithM3&C26&M3 = mai::C26 with mai::M3 /*isAnonymousMixin*/ {
synthetic constructor •() self::_C26WithM3&C26&M3
: super mai::C26::•()
;
synthetic mixin-super-stub method method6() core::int
return super.{mai::M3::method6}();
}
static field dynamic x;
static method test() void {
self::x{dynamic}.foo(){dynamic}.bar.{dynamic}baz = 42;
{
final synthesized dynamic #0#0 = self::x;
final const synthesized core::int #0#1 = #C6;
if(#0#0{dynamic}.<(#C6) as core::bool) {
core::print("<3");
}
}
#L1:
{
final synthesized dynamic #1#0 = self::x;
final const synthesized core::int #1#3 = #C7;
{
if(#1#0 is dynamic && #C7 =={core::num::==}{(core::Object) → core::bool} #1#0{dynamic}.foo) {
{
core::print("dyn");
break #L1;
}
}
}
{
if(true) {
}
}
}
mai::C1 o1 = new mai::C1::•();
o1.{mai::C1::method1}(){() void};
core::print(o1.{mai::C1::method1}{() void});
core::print(o1.{mai::C1::getter1}{core::int});
o1.{mai::C1::setter1} = 42;
mai::C1::method2();
core::print(#C8);
core::print(mai::C1::getter2);
mai::C1::setter2 = 42;
core::print(#C9);
core::print(o1.{mai::C1::field1}{core::int});
core::print(mai::C1::field2);
mai::C2 o2 = new mai::C2::•();
o2.{mai::C2::method1}(){() void};
core::print(o2.{mai::C2::method1}{() void});
core::print(o2.{mai::C2::getter1}{core::int});
o2.{mai::C2::setter1} = 42;
mai::C2::method2();
core::print(#C10);
core::print(mai::C2::getter2);
mai::C2::setter2 = 42;
core::print(#C11);
core::print(o2.{mai::C2::field1}{core::int});
core::print(mai::C2::field2);
mai::method1();
core::print(#C12);
mai::method2();
core::print(#C13);
core::print(mai::field1);
mai::field1 = 42;
core::print(mai::field2);
mai::field2 = 42;
core::print(new mai::C8::•());
core::print(mai::C8::fact3());
core::print(#C14);
core::print(new mai::C9::•());
core::print(mai::C9::fact3());
core::print(#C15);
core::print(#C16);
core::print(mai::ExtType1|constructor#(42));
core::print(mai::Ext1|get#isPositive(42));
core::print(#C16);
core::print(mai::ExtType2|constructor#(42));
core::print(mai::ExtType2|get#isPositive(mai::ExtType2|constructor#(42)));
core::print(#C16);
core::print(mai::ExtType3|constructor#(42));
core::print(mai::ExtType3|get#isPositive(mai::ExtType3|constructor#(42)));
core::print(#C16);
core::print(mai::ExtType4|constructor#(42));
core::print(mai::ExtType4|get#isPositive(mai::ExtType4|constructor#(42)));
core::print(mai::Ext2|get#isNegative2(1));
core::print(mai::Ext3|get#isNegative3(1));
core::print(mai::Ext4|get#isNegative4(1));
core::print(mai::Ext4|get#isNegative4(1));
core::print(mai::Ext1|get#isPositive(1));
core::print(mai::Ext5|get#isNegative5(1));
core::print(mai::Ext5|get#isNegative5(1));
core::print(#C16);
core::print(mai::ExtType5|constructor#plus1(3));
core::print(mai::ExtType5|get#isPositive(mai::ExtType5|constructor#plus1(3)));
core::print(new mai3::Lib3Class::•());
mai3::lib3Method();
mai3::lib3Field = 42;
core::print(#C16);
core::print(mai3::Lib3ExtType|constructor#(42));
core::print(mai3::Lib3Ext|get#lib3IsPositive(42));
}
static method testCanBeUsedAsType(core::Object? o) void {
o is mai::C10;
o as mai::C10;
core::List<mai::C10> list1;
core::print(#C17);
core::print(<mai::C10>[]);
o{mai::C10} is mai::ExtType10% /* erasure=core::int, declared=! */;
o{mai::C10} as mai::ExtType10% /* erasure=core::int, declared=! */;
core::List<mai::ExtType10% /* erasure=core::int, declared=! */> list2;
core::print(#C16);
core::print(<mai::ExtType10% /* erasure=core::int, declared=! */>[]);
o{mai::C10} is mai::C11;
o{mai::C10} as mai::C11;
core::List<mai::C11> list3;
core::print(#C18);
core::print(<mai::C11>[]);
o{mai::C10} is mai::ExtType11% /* erasure=core::int, declared=! */;
o{mai::C10} as mai::ExtType11% /* erasure=core::int, declared=! */;
core::List<mai::ExtType11% /* erasure=core::int, declared=! */> list4;
core::print(#C16);
core::print(<mai::ExtType11% /* erasure=core::int, declared=! */>[]);
o{mai::C10} is mai::C12;
o{mai::C10} as mai::C12;
core::List<mai::C12> list5;
core::print(#C19);
core::print(<mai::C12>[]);
o{mai::C10} is mai::ExtType12% /* erasure=core::int, declared=! */;
o{mai::C10} as mai::ExtType12% /* erasure=core::int, declared=! */;
core::List<mai::ExtType12% /* erasure=core::int, declared=! */> list6;
core::print(#C16);
core::print(<mai::ExtType12% /* erasure=core::int, declared=! */>[]);
o{mai::C10} is mai4::Lib4Class;
o{mai::C10} as mai4::Lib4Class;
core::List<mai4::Lib4Class> list7;
core::print(#C20);
core::print(<mai4::Lib4Class>[]);
o{mai::C10} is mai4::Lib4ExtType% /* erasure=core::int, declared=! */;
o{mai::C10} as mai4::Lib4ExtType% /* erasure=core::int, declared=! */;
core::List<mai4::Lib4ExtType% /* erasure=core::int, declared=! */> list8;
core::print(#C16);
core::print(<mai4::Lib4ExtType% /* erasure=core::int, declared=! */>[]);
core::print(new mai::C10::•());
core::print(mai::ExtType10|constructor#(20));
o{mai::C10} is mai::C13;
o{mai::C10} as mai::C13;
core::List<mai::C13> list9;
core::print(#C21);
core::print(<mai::C13>[]);
core::print(<mai::ExtType13% /* erasure=core::int, declared=! */>[]);
final core::List<mai::C14> inferredList = <mai::C14>[new mai::C15::•(), new mai::C16::•()];
}
static method testDynamicallyCallable() void {
self::x{dynamic}.dcMethod1();
self::x{dynamic}.dcMethod2("a", 2);
self::x{dynamic}.dcGetter1;
self::x.{dynamic}dcSetter1 = 42;
self::x{dynamic}.dcMethod3();
self::x{dynamic}.dcMethod4("a", 2);
self::x{dynamic}.dcGetter2;
self::x.{dynamic}dcSetter2 = 42;
self::x{dynamic}.dcField1;
self::x{dynamic}.dcField2;
self::x.{dynamic}dcField2 = 42;
self::x.{dynamic}dcField1 = 42;
self::x{dynamic}.dcField5;
self::x.{dynamic}dcField5 = 42;
self::x{dynamic}.dcMethod5();
new self::C26WithM3::•().{self::_C26WithM3&C26&M3::method6}(){() core::int};
self::x{dynamic}.allowedMethod();
self::x{dynamic}.allowedMethod;
self::x{dynamic}.allowedGetter;
self::x.{dynamic}allowedSetter = 2;
self::x{dynamic}.notAllowedGetter;
self::x{dynamic}.notAllowedMethod();
self::x{dynamic}.allowedGetter();
self::x{dynamic}.allowedSetter;
}
static method main() void {}
library;
import self as mai;
import "dart:core" as core;
class C1 extends core::Object {
field core::int field1 = 2;
static field core::int field2 = 3;
constructor •() mai::C1
: super core::Object::•()
;
method method1() void {}
get getter1() core::int
return 1;
set setter1(core::int value) void {}
static method method2() void {}
static get getter2() core::int
return 1;
static set setter2(core::int value) void {}
}
class C2 extends core::Object {
field core::int field1 = 2;
static field core::int field2 = 3;
constructor •() mai::C2
: super core::Object::•()
;
method method1() void {}
get getter1() core::int
return 1;
set setter1(core::int value) void {}
static method method2() void {}
static get getter2() core::int
return 1;
static set setter2(core::int value) void {}
}
class C3 extends core::Object {
synthetic constructor •() mai::C3
: super core::Object::•()
;
}
abstract class C4 extends core::Object {
field core::int? field1 = null;
field core::int? field2 = null;
synthetic constructor •() mai::C4
: super core::Object::•()
;
abstract method method1() void;
abstract method method2() void;
}
abstract class M1 extends core::Object /*isMixinDeclaration*/ {
}
abstract class M2 extends core::Object /*isMixinDeclaration*/ {
}
class Base extends core::Object {
synthetic constructor •() mai::Base
: super core::Object::•()
;
method foo() void {}
}
abstract class Interface extends core::Object {
synthetic constructor •() mai::Interface
: super core::Object::•()
;
abstract method foo() void;
}
abstract class Mixin extends core::Object /*isMixinDeclaration*/ {
method foo() void {}
}
class _C5 extends core::Object /*hasConstConstructor*/ {
final field core::Function func;
const constructor •(initializing-formal core::Function func) mai::_C5
: mai::_C5::func = func, super core::Object::•()
;
}
class _ConstForC6 extends core::Object /*hasConstConstructor*/ {
final field core::Function _f;
const constructor •(initializing-formal core::Function _f) mai::_ConstForC6
: mai::_ConstForC6::_f = _f, super core::Object::•()
;
}
class C6 extends core::Object {
constructor •({core::Object param = #C2}) → mai::C6
: super core::Object::•()
;
}
class _ConstForC7 extends core::Object /*hasConstConstructor*/ {
final field core::Function _f;
const constructor •(initializing-formal core::Function _f) mai::_ConstForC7
: mai::_ConstForC7::_f = _f, super core::Object::•()
;
}
class C7 extends core::Object {
constructor •({core::Object param = #C4}) → mai::C7
: super core::Object::•()
;
}
class C8 extends core::Object /*hasConstConstructor*/ {
constructor •() mai::C8
: super core::Object::•() {}
const constructor constConstr() mai::C8
: super core::Object::•()
;
static factory fact1() mai::C8 /* redirection-target: mai::C8::• */
return new mai::C8::•();
static factory fact2() mai::C8 /* redirection-target: mai::C8::fact3 */
return mai::C8::fact3();
static factory fact3() mai::C8
return new mai::C8::•();
static const factory fact4() mai::C8 /* redirection-target: mai::C8::constConstr */
return new mai::C8::constConstr();
}
class C9 extends core::Object /*hasConstConstructor*/ {
constructor •() mai::C9
: super core::Object::•() {}
const constructor constConstr() mai::C9
: super core::Object::•()
;
static factory fact1() mai::C9 /* redirection-target: mai::C9::• */
return new mai::C9::•();
static factory fact2() mai::C9 /* redirection-target: mai::C9::fact3 */
return mai::C9::fact3();
static factory fact3() mai::C9
return new mai::C9::•();
static const factory fact4() mai::C9 /* redirection-target: mai::C9::constConstr */
return new mai::C9::constConstr();
}
class C10 extends core::Object {
synthetic constructor •() mai::C10
: super core::Object::•()
;
}
class C11 extends core::Object {
synthetic constructor •() mai::C11
: super core::Object::•()
;
}
class C12 extends core::Object {
synthetic constructor •() mai::C12
: super core::Object::•()
;
}
class C13 extends core::Object {
synthetic constructor •() mai::C13
: super core::Object::•()
;
}
class C14 extends core::Object {
synthetic constructor •() mai::C14
: super core::Object::•()
;
}
class C15 extends core::Object implements mai::C14 {
synthetic constructor •() mai::C15
: super core::Object::•()
;
}
class C16 extends core::Object implements mai::C14 {
synthetic constructor •() mai::C16
: super core::Object::•()
;
}
class C17 extends core::Object {
synthetic constructor •() mai::C17
: super core::Object::•()
;
method dcMethod1() void {}
method dcMethod2(core::String x, core::int y) void {}
get dcGetter1() core::int
return 1;
set dcSetter1(core::int value) void {}
}
class C18 extends core::Object {
final field core::int dcField1 = 1;
field core::int dcField2 = 1;
synthetic constructor •() mai::C18
: super core::Object::•()
;
method dcMethod3() void {}
method dcMethod4(core::String x, core::int y) void {}
get dcGetter2() core::int
return 1;
set dcSetter2(core::int value) void {}
}
class C19 extends core::Object {
synthetic constructor •() mai::C19
: super core::Object::•()
;
@#C5
method noSuchMethod(core::Invocation invocation) dynamic
return super.{core::Object::noSuchMethod}(invocation);
}
class C20 extends core::Object {
synthetic constructor •() mai::C20
: super core::Object::•()
;
@#C5
method noSuchMethod(core::Invocation invocation) dynamic
return super.{core::Object::noSuchMethod}(invocation);
}
class C21 extends mai::C20 {
synthetic constructor •() mai::C21
: super mai::C20::•()
;
}
class C22 extends core::Object {
synthetic constructor •() mai::C22
: super core::Object::•()
;
}
class C23 extends mai::C22 {
synthetic constructor •() mai::C23
: super mai::C22::•()
;
@#C5
method noSuchMethod(core::Invocation invocation) dynamic
return super.{core::Object::noSuchMethod}(invocation);
}
class C24 extends core::Object {
synthetic constructor •() mai::C24
: super core::Object::•()
;
}
class C25 extends core::Object implements mai::C24 {
synthetic constructor •() mai::C25
: super core::Object::•()
;
@#C5
method noSuchMethod(core::Invocation invocation) dynamic
return super.{core::Object::noSuchMethod}(invocation);
}
class C26 extends core::Object {
synthetic constructor •() mai::C26
: super core::Object::•()
;
method _privateMethod1() core::int
return 1;
}
abstract class M3 extends mai::C26 /*isMixinDeclaration*/ {
method method6() core::int
return (this as dynamic){dynamic}._privateMethod1() as{TypeError,ForDynamic} core::int;
}
extension Ext1 on core::int {
get isPositive = mai::Ext1|get#isPositive;
}
extension Ext2 on core::int {
get isNegative2 = mai::Ext2|get#isNegative2;
}
extension Ext3 on core::int {
get isNegative3 = mai::Ext3|get#isNegative3;
}
extension Ext4 on core::int {
get isNegative4 = mai::Ext4|get#isNegative4;
}
extension Ext5 on core::int {
get isNegative5 = mai::Ext5|get#isNegative5;
}
extension type ExtType1(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
constructor = mai::ExtType1|constructor#;
constructor tearoff = mai::ExtType1|constructor#_#new#tearOff;
}
extension type ExtType2(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
get isPositive = mai::ExtType2|get#isPositive;
constructor = mai::ExtType2|constructor#;
constructor tearoff = mai::ExtType2|constructor#_#new#tearOff;
}
extension type ExtType3(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
get isPositive = mai::ExtType3|get#isPositive;
constructor = mai::ExtType3|constructor#;
constructor tearoff = mai::ExtType3|constructor#_#new#tearOff;
}
extension type ExtType4(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
get isPositive = mai::ExtType4|get#isPositive;
constructor = mai::ExtType4|constructor#;
constructor tearoff = mai::ExtType4|constructor#_#new#tearOff;
}
extension type ExtType5(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
get isPositive = mai::ExtType5|get#isPositive;
constructor _ = mai::ExtType5|constructor#_;
constructor tearoff _ = mai::ExtType5|constructor#_#_#tearOff;
constructor plus1 = mai::ExtType5|constructor#plus1;
constructor tearoff plus1 = mai::ExtType5|constructor#_#plus1#tearOff;
}
extension type ExtType10(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
constructor = mai::ExtType10|constructor#;
constructor tearoff = mai::ExtType10|constructor#_#new#tearOff;
}
extension type ExtType11(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
constructor = mai::ExtType11|constructor#;
constructor tearoff = mai::ExtType11|constructor#_#new#tearOff;
}
extension type ExtType12(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
constructor = mai::ExtType12|constructor#;
constructor tearoff = mai::ExtType12|constructor#_#new#tearOff;
}
extension type ExtType13(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
constructor = mai::ExtType13|constructor#;
constructor tearoff = mai::ExtType13|constructor#_#new#tearOff;
}
static field core::int field1 = 4;
static field core::int field2 = 4;
static const field mai::_C5 const1 = #C23;
static const field mai::_C5 const2 = #C25;
static method method1() void {}
static method method2() void {}
static method _privateMethod1() void {}
static method _privateMethod2() void {}
static method _privateMethodForC6() void {}
static method _privateMethodForC7() void {}
static extension-type-member method ExtType1|constructor#(initializing-formal core::int raw) → mai::ExtType1% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType1% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType1|constructor#_#new#tearOff(core::int raw) → mai::ExtType1% /* erasure=core::int, declared=! */
return mai::ExtType1|constructor#(raw);
static extension-member method Ext1|get#isPositive(lowered final core::int #this) → core::bool
return #this.{core::num::>}(0){(core::num) → core::bool};
static extension-member method Ext2|get#isNegative2(lowered final core::int #this) → core::bool
return #this.{core::num::<}(0){(core::num) → core::bool};
static extension-member method Ext3|get#isNegative3(lowered final core::int #this) → core::bool
return #this.{core::num::<}(0){(core::num) → core::bool};
static extension-member method Ext4|get#isNegative4(lowered final core::int #this) → core::bool
return #this.{core::num::<}(0){(core::num) → core::bool};
static extension-member method Ext5|get#isNegative5(lowered final core::int #this) → core::bool
return #this.{core::num::<}(0){(core::num) → core::bool};
static extension-type-member method ExtType2|constructor#(initializing-formal core::int raw) → mai::ExtType2% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType2% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType2|constructor#_#new#tearOff(core::int raw) → mai::ExtType2% /* erasure=core::int, declared=! */
return mai::ExtType2|constructor#(raw);
static extension-type-member method ExtType2|get#isPositive(lowered final mai::ExtType2% /* erasure=core::int, declared=! */ #this) → core::bool
return (#this as{Unchecked} core::int).{core::num::>}(0){(core::num) core::bool};
static extension-type-member method ExtType3|constructor#(initializing-formal core::int raw) → mai::ExtType3% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType3% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType3|constructor#_#new#tearOff(core::int raw) → mai::ExtType3% /* erasure=core::int, declared=! */
return mai::ExtType3|constructor#(raw);
static extension-type-member method ExtType3|get#isPositive(lowered final mai::ExtType3% /* erasure=core::int, declared=! */ #this) → core::bool
return (#this as{Unchecked} core::int).{core::num::>}(0){(core::num) core::bool};
static extension-type-member method ExtType4|constructor#(initializing-formal core::int raw) → mai::ExtType4% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType4% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType4|constructor#_#new#tearOff(core::int raw) → mai::ExtType4% /* erasure=core::int, declared=! */
return mai::ExtType4|constructor#(raw);
static extension-type-member method ExtType4|get#isPositive(lowered final mai::ExtType4% /* erasure=core::int, declared=! */ #this) → core::bool
return (#this as{Unchecked} core::int).{core::num::>}(0){(core::num) core::bool};
static extension-type-member method ExtType5|constructor#_(initializing-formal core::int raw) → mai::ExtType5% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType5% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType5|constructor#_#_#tearOff(core::int raw) → mai::ExtType5% /* erasure=core::int, declared=! */
return mai::ExtType5|constructor#_(raw);
static extension-type-member synthetic method ExtType5|constructor#_#plus1#tearOff(core::int n) → mai::ExtType5% /* erasure=core::int, declared=! */
return mai::ExtType5|constructor#plus1(n);
static extension-type-member method ExtType5|constructor#plus1(core::int n) → mai::ExtType5% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType5% /* erasure=core::int, declared=! */ #this;
#this = mai::ExtType5|constructor#_(n.{core::num::+}(1){(core::num) → core::int});
return #this;
}
static extension-type-member method ExtType5|get#isPositive(lowered final mai::ExtType5% /* erasure=core::int, declared=! */ #this) → core::bool
return (#this as{Unchecked} core::int).{core::num::>}(0){(core::num) core::bool};
static extension-type-member method ExtType10|constructor#(initializing-formal core::int raw) → mai::ExtType10% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType10% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType10|constructor#_#new#tearOff(core::int raw) → mai::ExtType10% /* erasure=core::int, declared=! */
return mai::ExtType10|constructor#(raw);
static extension-type-member method ExtType11|constructor#(initializing-formal core::int raw) → mai::ExtType11% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType11% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType11|constructor#_#new#tearOff(core::int raw) → mai::ExtType11% /* erasure=core::int, declared=! */
return mai::ExtType11|constructor#(raw);
static extension-type-member method ExtType12|constructor#(initializing-formal core::int raw) → mai::ExtType12% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType12% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType12|constructor#_#new#tearOff(core::int raw) → mai::ExtType12% /* erasure=core::int, declared=! */
return mai::ExtType12|constructor#(raw);
static extension-type-member method ExtType13|constructor#(initializing-formal core::int raw) → mai::ExtType13% /* erasure=core::int, declared=! */ {
lowered final mai::ExtType13% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method ExtType13|constructor#_#new#tearOff(core::int raw) → mai::ExtType13% /* erasure=core::int, declared=! */
return mai::ExtType13|constructor#(raw);
library;
import self as self2;
import "main_lib3.dart" as mai3;
additionalExports = (mai3::Lib3Class,
mai3::lib3Method,
mai3::lib3Field,
mai3::lib3Field,
mai3::Lib3ExtType,
mai3::Lib3Ext)
export "org-dartlang-testcase:///main_lib3.dart";
library;
import self as mai3;
import "dart:core" as core;
class Lib3Class extends core::Object {
synthetic constructor •() mai3::Lib3Class
: super core::Object::•()
;
}
extension Lib3Ext on core::int {
get lib3IsPositive = mai3::Lib3Ext|get#lib3IsPositive;
}
extension type Lib3ExtType(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
constructor = mai3::Lib3ExtType|constructor#;
constructor tearoff = mai3::Lib3ExtType|constructor#_#new#tearOff;
}
static field core::int? lib3Field;
static method lib3Method() void {}
static extension-type-member method Lib3ExtType|constructor#(initializing-formal core::int raw) → mai3::Lib3ExtType% /* erasure=core::int, declared=! */ {
lowered final mai3::Lib3ExtType% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method Lib3ExtType|constructor#_#new#tearOff(core::int raw) → mai3::Lib3ExtType% /* erasure=core::int, declared=! */
return mai3::Lib3ExtType|constructor#(raw);
static extension-member method Lib3Ext|get#lib3IsPositive(lowered final core::int #this) → core::bool
return #this.{core::num::>}(0){(core::num) → core::bool};
library;
import self as mai4;
import "dart:core" as core;
class Lib4Class extends core::Object {
synthetic constructor •() mai4::Lib4Class
: super core::Object::•()
;
}
extension type Lib4ExtType(core::int raw) {
abstract extension-type-member representation-field get raw() core::int;
constructor = mai4::Lib4ExtType|constructor#;
constructor tearoff = mai4::Lib4ExtType|constructor#_#new#tearOff;
}
static extension-type-member method Lib4ExtType|constructor#(initializing-formal core::int raw) → mai4::Lib4ExtType% /* erasure=core::int, declared=! */ {
lowered final mai4::Lib4ExtType% /* erasure=core::int, declared=! */ #this = raw;
return #this;
}
static extension-type-member synthetic method Lib4ExtType|constructor#_#new#tearOff(core::int raw) → mai4::Lib4ExtType% /* erasure=core::int, declared=! */
return mai4::Lib4ExtType|constructor#(raw);
library;
import self as mai2;
import "dart:core" as core;
class Lib5C1 extends core::Object {
field core::int? dcField5 = null;
synthetic constructor •() mai2::Lib5C1
: super core::Object::•()
;
method dcMethod5() void {}
}
static field core::int? g1 = 0;
constants {
#C1 = static-tearoff mai::_privateMethodForC6
#C2 = mai::_ConstForC6 {_f:#C1}
#C3 = static-tearoff mai::_privateMethodForC7
#C4 = mai::_ConstForC7 {_f:#C3}
#C5 = core::_Override {}
#C6 = 3
#C7 = 42
#C8 = static-tearoff mai::C1::method2
#C9 = constructor-tearoff mai::C1::•
#C10 = static-tearoff mai::C2::method2
#C11 = constructor-tearoff mai::C2::•
#C12 = static-tearoff mai::method1
#C13 = static-tearoff mai::method2
#C14 = mai::C8 {}
#C15 = mai::C9 {}
#C16 = TypeLiteralConstant(core::int)
#C17 = TypeLiteralConstant(mai::C10)
#C18 = TypeLiteralConstant(mai::C11)
#C19 = TypeLiteralConstant(mai::C12)
#C20 = TypeLiteralConstant(mai4::Lib4Class)
#C21 = TypeLiteralConstant(mai::C13)
#C22 = static-tearoff mai::_privateMethod1
#C23 = mai::_C5 {func:#C22}
#C24 = static-tearoff mai::_privateMethod2
#C25 = mai::_C5 {func:#C24}
}
Constructor coverage from constants:
org-dartlang-testcase:///main_lib1.dart:
- _ConstForC6. (from org-dartlang-testcase:///main_lib1.dart:72:9)
- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart)
- _ConstForC7. (from org-dartlang-testcase:///main_lib1.dart:83:9)
- _C5. (from org-dartlang-testcase:///main_lib1.dart:61:9)
org-dartlang-testcase:///main.dart:
- C8.constConstr (from org-dartlang-testcase:///main_lib1.dart:99:9)
- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart)
- C9.constConstr (from org-dartlang-testcase:///main_lib1.dart:108:9)