|
1 |
| -library; |
| 1 | +library /*isNonNullableByDefault*/; |
2 | 2 | import self as self;
|
3 | 3 | import "dart:core" as core;
|
4 | 4 |
|
5 | 5 | class A extends core::Object {
|
6 | 6 | field dynamic field = null;
|
7 |
| - synthetic constructor •() → self::A* |
| 7 | + synthetic constructor •() → self::A |
8 | 8 | : super core::Object::•()
|
9 | 9 | ;
|
10 |
| - abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
11 |
| - abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
12 |
| - abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
13 |
| - abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
14 |
| - abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
15 |
| - abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
16 |
| - abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
17 |
| - abstract member-signature method toString() → core::String*; -> core::Object::toString |
18 |
| - abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
19 |
| - abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
20 | 10 | }
|
21 | 11 | class B extends core::Object {
|
22 | 12 | field dynamic field = null;
|
23 |
| - synthetic constructor •() → self::B* |
| 13 | + synthetic constructor •() → self::B |
24 | 14 | : super core::Object::•()
|
25 | 15 | ;
|
26 |
| - abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
27 |
| - abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
28 |
| - abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
29 |
| - abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
30 |
| - abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
31 |
| - abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
32 |
| - abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
33 |
| - abstract member-signature method toString() → core::String*; -> core::Object::toString |
34 |
| - abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
35 |
| - abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
36 | 16 | }
|
37 | 17 | class C extends core::Object {
|
38 |
| - synthetic constructor •() → self::C* |
| 18 | + synthetic constructor •() → self::C |
39 | 19 | : super core::Object::•()
|
40 | 20 | ;
|
41 |
| - operator ==(dynamic x) → core::bool* |
| 21 | + operator ==(core::Object x) → core::bool |
42 | 22 | return false;
|
43 |
| - abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
44 |
| - abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
45 |
| - abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
46 |
| - abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
47 |
| - abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
48 |
| - abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
49 |
| - abstract member-signature method toString() → core::String*; -> core::Object::toString |
50 |
| - abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
51 |
| - abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
52 | 23 | }
|
53 | 24 | class X extends core::Object implements self::A, self::B {
|
54 | 25 | field dynamic field = null;
|
55 |
| - synthetic constructor •() → self::X* |
| 26 | + synthetic constructor •() → self::X |
56 | 27 | : super core::Object::•()
|
57 | 28 | ;
|
58 |
| - abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
59 |
| - abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
60 |
| - abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
61 |
| - abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
62 |
| - abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
63 |
| - abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
64 |
| - abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
65 |
| - abstract member-signature method toString() → core::String*; -> core::Object::toString |
66 |
| - abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
67 |
| - abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
68 | 29 | }
|
69 |
| -static method useAsA(self::A* object) → void { |
| 30 | +static method useAsA(self::A object) → void { |
70 | 31 | dynamic _ = object.{self::A::field}{dynamic};
|
71 | 32 | }
|
72 |
| -static method useAsB(self::B* object) → void { |
| 33 | +static method useAsB(self::B object) → void { |
73 | 34 | dynamic _ = object.{self::B::field}{dynamic};
|
74 | 35 | self::escape(object);
|
75 | 36 | }
|
76 | 37 | static method escape(dynamic x) → void {
|
77 | 38 | x == null ?{dynamic} x = "" : null;
|
78 | 39 | x == null ?{dynamic} x = 45 : null;
|
79 |
| - if(!(x is core::int*) && !(x is core::String*)) { |
| 40 | + if(!(x is{ForNonNullableByDefault} core::int) && !(x is{ForNonNullableByDefault} core::String)) { |
80 | 41 | x{dynamic}.field = 45;
|
81 | 42 | }
|
82 | 43 | }
|
83 | 44 | static method main() → dynamic {
|
84 |
| - self::X* object = new self::X::•(); |
| 45 | + self::X object = new self::X::•(); |
85 | 46 | self::useAsA(new self::A::•());
|
86 | 47 | self::useAsA(object);
|
87 | 48 | self::useAsB(new self::B::•());
|
|
0 commit comments