@@ -14,6 +14,14 @@ library;
14
14
// E3.named(this.foo, [super.bar = null]);
15
15
// ^^^
16
16
//
17
+ // pkg/front_end/testcases/extension_types/issue53212.dart:17:25: Error: Extension type constructors can't declare super formal parameters.
18
+ // extension type E4(super.foo) {} // Error.
19
+ // ^^^
20
+ //
21
+ // pkg/front_end/testcases/extension_types/issue53212.dart:17:25: Error: Expected a representation type.
22
+ // extension type E4(super.foo) {} // Error.
23
+ // ^^^
24
+ //
17
25
import self as self;
18
26
import "dart:core" as core;
19
27
@@ -38,6 +46,11 @@ extension type E3(core::int foo) {
38
46
constructor named = self::E3|constructor#named;
39
47
constructor tearoff named = self::E3|constructor#_#named#tearOff;
40
48
}
49
+ extension type E4(dynamic foo) {
50
+ abstract inline-class-member representation-field get foo() → dynamic;
51
+ constructor • = self::E4|constructor#;
52
+ constructor tearoff • = self::E4|constructor#_#new#tearOff;
53
+ }
41
54
static inline-class-member method E1|constructor#(core::int foo) → self::E1 /* = core::int */ {
42
55
lowered final self::E1 /* = core::int */ #this = foo;
43
56
return #this;
@@ -74,6 +87,12 @@ static inline-class-member method E3|constructor#named(core::int foo, [has-decla
74
87
}
75
88
static inline-class-member method E3|constructor#_#named#tearOff(core::int foo, [has-declared-initializer invalid-type bar]) → self::E3 /* = core::int */
76
89
return self::E3|constructor#named(foo, bar);
90
+ static inline-class-member method E4|constructor#(dynamic foo) → self::E4 /* = dynamic */ {
91
+ lowered final self::E4 /* = dynamic */ #this = foo;
92
+ return #this;
93
+ }
94
+ static inline-class-member method E4|constructor#_#new#tearOff(dynamic foo) → self::E4 /* = dynamic */
95
+ return self::E4|constructor#(foo);
77
96
78
97
constants {
79
98
#C1 = null
0 commit comments