|
| 1 | +library; |
| 2 | +// |
| 3 | +// Problems in library: |
| 4 | +// |
| 5 | +// pkg/front_end/testcases/extension_types/issue53212.dart:6:28: Error: Extension type constructors can't declare super formal parameters. |
| 6 | +// E1.named(this.foo, super.bar); // Error. |
| 7 | +// ^^^ |
| 8 | +// |
| 9 | +// pkg/front_end/testcases/extension_types/issue53212.dart:10:38: Error: Extension type constructors can't declare super formal parameters. |
| 10 | +// E2.named(this.foo, {required super.bar}); // Error. |
| 11 | +// ^^^ |
| 12 | +// |
| 13 | +// pkg/front_end/testcases/extension_types/issue53212.dart:14:29: Error: Extension type constructors can't declare super formal parameters. |
| 14 | +// E3.named(this.foo, [super.bar = null]); |
| 15 | +// ^^^ |
| 16 | +// |
| 17 | +import self as self; |
| 18 | +import "dart:core" as core; |
| 19 | + |
| 20 | +extension type E1(core::int foo) { |
| 21 | + abstract inline-class-member representation-field get foo() → core::int; |
| 22 | + constructor • = self::E1|constructor#; |
| 23 | + constructor tearoff • = self::E1|constructor#_#new#tearOff; |
| 24 | + constructor named = self::E1|constructor#named; |
| 25 | + constructor tearoff named = self::E1|constructor#_#named#tearOff; |
| 26 | +} |
| 27 | +extension type E2(core::int foo) { |
| 28 | + abstract inline-class-member representation-field get foo() → core::int; |
| 29 | + constructor • = self::E2|constructor#; |
| 30 | + constructor tearoff • = self::E2|constructor#_#new#tearOff; |
| 31 | + constructor named = self::E2|constructor#named; |
| 32 | + constructor tearoff named = self::E2|constructor#_#named#tearOff; |
| 33 | +} |
| 34 | +extension type E3(core::int foo) { |
| 35 | + abstract inline-class-member representation-field get foo() → core::int; |
| 36 | + constructor • = self::E3|constructor#; |
| 37 | + constructor tearoff • = self::E3|constructor#_#new#tearOff; |
| 38 | + constructor named = self::E3|constructor#named; |
| 39 | + constructor tearoff named = self::E3|constructor#_#named#tearOff; |
| 40 | +} |
| 41 | +static inline-class-member method E1|constructor#(core::int foo) → self::E1 /* = core::int */ { |
| 42 | + lowered final self::E1 /* = core::int */ #this = foo; |
| 43 | + return #this; |
| 44 | +} |
| 45 | +static inline-class-member method E1|constructor#_#new#tearOff(core::int foo) → self::E1 /* = core::int */ |
| 46 | + return self::E1|constructor#(foo); |
| 47 | +static inline-class-member method E1|constructor#named(core::int foo, invalid-type bar) → self::E1 /* = core::int */ { |
| 48 | + lowered final self::E1 /* = core::int */ #this = foo; |
| 49 | + return #this; |
| 50 | +} |
| 51 | +static inline-class-member method E1|constructor#_#named#tearOff(core::int foo, invalid-type bar) → self::E1 /* = core::int */ |
| 52 | + return self::E1|constructor#named(foo, bar); |
| 53 | +static inline-class-member method E2|constructor#(core::int foo) → self::E2 /* = core::int */ { |
| 54 | + lowered final self::E2 /* = core::int */ #this = foo; |
| 55 | + return #this; |
| 56 | +} |
| 57 | +static inline-class-member method E2|constructor#_#new#tearOff(core::int foo) → self::E2 /* = core::int */ |
| 58 | + return self::E2|constructor#(foo); |
| 59 | +static inline-class-member method E2|constructor#named(core::int foo, {required invalid-type bar = #C1}) → self::E2 /* = core::int */ { |
| 60 | + lowered final self::E2 /* = core::int */ #this = foo; |
| 61 | + return #this; |
| 62 | +} |
| 63 | +static inline-class-member method E2|constructor#_#named#tearOff(core::int foo, {required invalid-type bar}) → self::E2 /* = core::int */ |
| 64 | + return self::E2|constructor#named(foo, bar: bar); |
| 65 | +static inline-class-member method E3|constructor#(core::int foo) → self::E3 /* = core::int */ { |
| 66 | + lowered final self::E3 /* = core::int */ #this = foo; |
| 67 | + return #this; |
| 68 | +} |
| 69 | +static inline-class-member method E3|constructor#_#new#tearOff(core::int foo) → self::E3 /* = core::int */ |
| 70 | + return self::E3|constructor#(foo); |
| 71 | +static inline-class-member method E3|constructor#named(core::int foo, [has-declared-initializer invalid-type bar = #C1]) → self::E3 /* = core::int */ { |
| 72 | + lowered final self::E3 /* = core::int */ #this = foo; |
| 73 | + return #this; |
| 74 | +} |
| 75 | +static inline-class-member method E3|constructor#_#named#tearOff(core::int foo, [has-declared-initializer invalid-type bar]) → self::E3 /* = core::int */ |
| 76 | + return self::E3|constructor#named(foo, bar); |
| 77 | + |
| 78 | +constants { |
| 79 | + #C1 = null |
| 80 | +} |
0 commit comments