| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/issue53625.dart:6:29: Error: Primary constructors in extension types can't use initializing formals. |
| // Try removing `this.` from the formal parameter. |
| // extension type E07(int this.x) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue53625.dart:9:30: Error: Extension type constructors can't declare super formal parameters. |
| // extension type E08(int super.x) /* Error */ {} |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/issue53625.dart:12:24: Error: Primary constructors in extension types can't use function formal parameter syntax. |
| // Try rewriting with an explicit function type, like `int Function() f`. |
| // extension type E11(int x()) /* Error */ {} |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| extension type E07(core::int x) { |
| abstract extension-type-member representation-field get x() → core::int; |
| constructor • = self::E07|constructor#; |
| constructor tearoff • = self::E07|constructor#_#new#tearOff; |
| } |
| extension type E08(core::int x) { |
| abstract extension-type-member representation-field get x() → core::int; |
| constructor • = self::E08|constructor#; |
| constructor tearoff • = self::E08|constructor#_#new#tearOff; |
| } |
| extension type E11(() → core::int x) { |
| abstract extension-type-member representation-field get x() → () → core::int; |
| constructor • = self::E11|constructor#; |
| constructor tearoff • = self::E11|constructor#_#new#tearOff; |
| } |
| static extension-type-member method E07|constructor#(core::int x) → self::E07% /* erasure=core::int, declared=! */ { |
| lowered final self::E07% /* erasure=core::int, declared=! */ #this = x; |
| return #this; |
| } |
| static extension-type-member method E07|constructor#_#new#tearOff(core::int x) → self::E07% /* erasure=core::int, declared=! */ |
| return self::E07|constructor#(x); |
| static extension-type-member method E08|constructor#(core::int x) → self::E08% /* erasure=core::int, declared=! */ { |
| lowered final self::E08% /* erasure=core::int, declared=! */ #this = x; |
| return #this; |
| } |
| static extension-type-member method E08|constructor#_#new#tearOff(core::int x) → self::E08% /* erasure=core::int, declared=! */ |
| return self::E08|constructor#(x); |
| static extension-type-member method E11|constructor#(() → core::int x) → self::E11% /* erasure=() → core::int, declared=! */ { |
| lowered final self::E11% /* erasure=() → core::int, declared=! */ #this = x; |
| return #this; |
| } |
| static extension-type-member method E11|constructor#_#new#tearOff(() → core::int x) → self::E11% /* erasure=() → core::int, declared=! */ |
| return self::E11|constructor#(x); |