|
| 1 | +library; |
| 2 | +// |
| 3 | +// Problems in library: |
| 4 | +// |
| 5 | +// pkg/front_end/testcases/extension_types/issue53867.dart:10:37: Error: The representation type 'E2' of extension type 'E6' must be either a subtype of the representation type 'int' of the implemented extension type 'E3' or a subtype of 'E3' itself. |
| 6 | +// Try changing the representation type to a subtype of 'int'. |
| 7 | +// extension type E6(E2 it) implements E3 {} // Error. |
| 8 | +// ^ |
| 9 | +// |
| 10 | +// pkg/front_end/testcases/extension_types/issue53867.dart:11:41: Error: The representation type 'String' of extension type 'E7' must be either a subtype of the representation type 'num' of the implemented extension type 'E1' or a subtype of 'E1' itself. |
| 11 | +// Try changing the representation type to a subtype of 'num'. |
| 12 | +// extension type E7(String it) implements E1 {} // Error. |
| 13 | +// ^ |
| 14 | +// |
| 15 | +import self as self; |
| 16 | +import "dart:core" as core; |
| 17 | + |
| 18 | +extension type E1(core::num it) { |
| 19 | + abstract inline-class-member representation-field get it() → core::num; |
| 20 | + constructor • = self::E1|constructor#; |
| 21 | + constructor tearoff • = self::E1|constructor#_#new#tearOff; |
| 22 | +} |
| 23 | +extension type E2(self::E1 /* = core::num */ it) implements self::E1 /* = core::num */ { |
| 24 | + abstract inline-class-member representation-field get it() → self::E1 /* = core::num */; |
| 25 | + constructor • = self::E2|constructor#; |
| 26 | + constructor tearoff • = self::E2|constructor#_#new#tearOff; |
| 27 | +} |
| 28 | +extension type E3(core::int it) implements self::E1 /* = core::num */ { |
| 29 | + abstract inline-class-member representation-field get it() → core::int; |
| 30 | + constructor • = self::E3|constructor#; |
| 31 | + constructor tearoff • = self::E3|constructor#_#new#tearOff; |
| 32 | +} |
| 33 | +extension type E4(self::E3 /* = core::int */ it) implements self::E1 /* = core::num */ { |
| 34 | + abstract inline-class-member representation-field get it() → self::E3 /* = core::int */; |
| 35 | + constructor • = self::E4|constructor#; |
| 36 | + constructor tearoff • = self::E4|constructor#_#new#tearOff; |
| 37 | +} |
| 38 | +extension type E5(self::E3 /* = core::int */ it) implements self::E2 /* = core::num */ { |
| 39 | + abstract inline-class-member representation-field get it() → self::E3 /* = core::int */; |
| 40 | + constructor • = self::E5|constructor#; |
| 41 | + constructor tearoff • = self::E5|constructor#_#new#tearOff; |
| 42 | +} |
| 43 | +extension type E6(self::E2 /* = core::num */ it) implements self::E3 /* = core::int */ { |
| 44 | + abstract inline-class-member representation-field get it() → self::E2 /* = core::num */; |
| 45 | + constructor • = self::E6|constructor#; |
| 46 | + constructor tearoff • = self::E6|constructor#_#new#tearOff; |
| 47 | +} |
| 48 | +extension type E7(core::String it) implements self::E1 /* = core::num */ { |
| 49 | + abstract inline-class-member representation-field get it() → core::String; |
| 50 | + constructor • = self::E7|constructor#; |
| 51 | + constructor tearoff • = self::E7|constructor#_#new#tearOff; |
| 52 | +} |
| 53 | +static inline-class-member method E1|constructor#(core::num it) → self::E1 /* = core::num */ { |
| 54 | + lowered final self::E1 /* = core::num */ #this = it; |
| 55 | + return #this; |
| 56 | +} |
| 57 | +static inline-class-member method E1|constructor#_#new#tearOff(core::num it) → self::E1 /* = core::num */ |
| 58 | + return self::E1|constructor#(it); |
| 59 | +static inline-class-member method E2|constructor#(self::E1 /* = core::num */ it) → self::E2 /* = core::num */ { |
| 60 | + lowered final self::E2 /* = core::num */ #this = it; |
| 61 | + return #this; |
| 62 | +} |
| 63 | +static inline-class-member method E2|constructor#_#new#tearOff(self::E1 /* = core::num */ it) → self::E2 /* = core::num */ |
| 64 | + return self::E2|constructor#(it); |
| 65 | +static inline-class-member method E3|constructor#(core::int it) → self::E3 /* = core::int */ { |
| 66 | + lowered final self::E3 /* = core::int */ #this = it; |
| 67 | + return #this; |
| 68 | +} |
| 69 | +static inline-class-member method E3|constructor#_#new#tearOff(core::int it) → self::E3 /* = core::int */ |
| 70 | + return self::E3|constructor#(it); |
| 71 | +static inline-class-member method E4|constructor#(self::E3 /* = core::int */ it) → self::E4 /* = core::int */ { |
| 72 | + lowered final self::E4 /* = core::int */ #this = it; |
| 73 | + return #this; |
| 74 | +} |
| 75 | +static inline-class-member method E4|constructor#_#new#tearOff(self::E3 /* = core::int */ it) → self::E4 /* = core::int */ |
| 76 | + return self::E4|constructor#(it); |
| 77 | +static inline-class-member method E5|constructor#(self::E3 /* = core::int */ it) → self::E5 /* = core::int */ { |
| 78 | + lowered final self::E5 /* = core::int */ #this = it; |
| 79 | + return #this; |
| 80 | +} |
| 81 | +static inline-class-member method E5|constructor#_#new#tearOff(self::E3 /* = core::int */ it) → self::E5 /* = core::int */ |
| 82 | + return self::E5|constructor#(it); |
| 83 | +static inline-class-member method E6|constructor#(self::E2 /* = core::num */ it) → self::E6 /* = core::num */ { |
| 84 | + lowered final self::E6 /* = core::num */ #this = it; |
| 85 | + return #this; |
| 86 | +} |
| 87 | +static inline-class-member method E6|constructor#_#new#tearOff(self::E2 /* = core::num */ it) → self::E6 /* = core::num */ |
| 88 | + return self::E6|constructor#(it); |
| 89 | +static inline-class-member method E7|constructor#(core::String it) → self::E7 /* = core::String */ { |
| 90 | + lowered final self::E7 /* = core::String */ #this = it; |
| 91 | + return #this; |
| 92 | +} |
| 93 | +static inline-class-member method E7|constructor#_#new#tearOff(core::String it) → self::E7 /* = core::String */ |
| 94 | + return self::E7|constructor#(it); |
0 commit comments