|
| 1 | +library; |
| 2 | +import self as self; |
| 3 | +import "dart:core" as core; |
| 4 | + |
| 5 | +class Superclass extends core::Object { |
| 6 | + synthetic constructor •() → self::Superclass* |
| 7 | + : super core::Object::•() |
| 8 | + ; |
| 9 | + method method1(core::num* argument1, core::num* argument2) → core::String* |
| 10 | + return "Superclass"; |
| 11 | + method method2(core::num* argument1, core::num* argument2) → core::String* |
| 12 | + return "Superclass"; |
| 13 | + method method3(core::num* argument1, covariant core::int* argument2) → core::String* |
| 14 | + return "Superclass"; |
| 15 | + method method4(core::num* argument1, covariant core::num* argument2) → core::String* |
| 16 | + return "Superclass"; |
| 17 | + abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
| 18 | + abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
| 19 | + abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
| 20 | + abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
| 21 | + abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
| 22 | + abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
| 23 | + abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
| 24 | + abstract member-signature method toString() → core::String*; -> core::Object::toString |
| 25 | + abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
| 26 | + abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
| 27 | +} |
| 28 | +class Mixin extends core::Object { |
| 29 | + synthetic constructor •() → self::Mixin* |
| 30 | + : super core::Object::•() |
| 31 | + ; |
| 32 | + method method1(core::num* argument1, core::num* argument2) → core::String* |
| 33 | + return "Mixin"; |
| 34 | + method method2(covariant core::int* argument1, core::num* argument2) → core::String* |
| 35 | + return "Mixin"; |
| 36 | + method method3(core::num* argument1, core::num* argument2) → core::String* |
| 37 | + return "Mixin"; |
| 38 | + method method4(covariant core::int* argument1, core::int* argument2) → core::String* |
| 39 | + return "Mixin"; |
| 40 | + abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
| 41 | + abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
| 42 | + abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
| 43 | + abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
| 44 | + abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
| 45 | + abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
| 46 | + abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
| 47 | + abstract member-signature method toString() → core::String*; -> core::Object::toString |
| 48 | + abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
| 49 | + abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
| 50 | +} |
| 51 | +abstract class _Class&Superclass&Mixin = self::Superclass with self::Mixin /*isAnonymousMixin*/ { |
| 52 | + synthetic constructor •() → self::_Class&Superclass&Mixin* |
| 53 | + : super self::Superclass::•() |
| 54 | + ; |
| 55 | + abstract forwarding-stub method method2(covariant core::num* argument1, core::num* argument2) → core::String*; |
| 56 | + forwarding-stub method method3(core::num* argument1, covariant core::num* argument2) → core::String* |
| 57 | + return super.{self::Superclass::method3}(argument1, argument2); |
| 58 | + forwarding-stub method method4(covariant core::num* argument1, covariant core::num* argument2) → core::String* |
| 59 | + return super.{self::Superclass::method4}(argument1, argument2); |
| 60 | +} |
| 61 | +class Class extends self::_Class&Superclass&Mixin { |
| 62 | + synthetic constructor •() → self::Class* |
| 63 | + : super self::_Class&Superclass&Mixin::•() |
| 64 | + ; |
| 65 | +} |
| 66 | +static method main() → dynamic { |
| 67 | + self::Class* c = new self::Class::•(); |
| 68 | + self::expect("Mixin", c.{self::Mixin::method1}(0, 1)); |
| 69 | + self::expect("Mixin", c.{self::_Class&Superclass&Mixin::method2}(0, 1)); |
| 70 | + self::expect("Mixin", c.{self::_Class&Superclass&Mixin::method3}(0, 1)); |
| 71 | + self::expect("Mixin", c.{self::_Class&Superclass&Mixin::method4}(0, 1)); |
| 72 | + self::Superclass* s = c; |
| 73 | + self::expect("Mixin", s.{self::Superclass::method1}(0.5, 1.5)); |
| 74 | + self::throws(() → core::String* => s.{self::Superclass::method2}(0.5, 1.5)); |
| 75 | + self::expect("Mixin", s.{self::Superclass::method3}(0.5, 1)); |
| 76 | + self::throws(() → core::String* => s.{self::Superclass::method4}(0.5, 1)); |
| 77 | + self::expect("Mixin", s.{self::Superclass::method4}(1, 0.5)); |
| 78 | + self::Mixin* m = c; |
| 79 | + self::expect("Mixin", m.{self::Mixin::method1}(0, 1)); |
| 80 | + self::expect("Mixin", m.{self::Mixin::method2}(0, 1)); |
| 81 | + self::expect("Mixin", m.{self::Mixin::method3}(0, 1)); |
| 82 | + self::expect("Mixin", m.{self::Mixin::method4}(0, 1)); |
| 83 | +} |
| 84 | +static method expect(dynamic expected, dynamic actual) → void { |
| 85 | + if(!expected.{core::Object::==}(actual)) |
| 86 | + throw "Expected ${expected}, actual ${actual}"; |
| 87 | +} |
| 88 | +static method throws(() →* void f) → void { |
| 89 | + try { |
| 90 | + f.call(); |
| 91 | + } |
| 92 | + on dynamic catch(final dynamic _) { |
| 93 | + return; |
| 94 | + } |
| 95 | + throw "Expected exception"; |
| 96 | +} |
0 commit comments