| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: Extension types can't declare instance fields |
| // Try removing the field declaration or making it a static field |
| // int id = 0; |
| // ^^ |
| // |
| // pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope. |
| // int id = 0; |
| // ^^ |
| // pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'. |
| // extension type ET1(int id) { |
| // ^^ |
| // |
| // pkg/front_end/testcases/extension_types/field_initializer.dart:10:7: Error: Extension types can't declare instance fields |
| // Try removing the field declaration or making it a static field |
| // int x = 0; |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/field_initializer.dart:14:13: Error: Extension types can't declare instance fields |
| // Try removing the field declaration or making it a static field |
| // final int x = 0; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| extension type ET1(core::int id) { |
| abstract extension-type-member representation-field get id() → core::int; |
| constructor • = self::ET1|constructor#; |
| constructor tearoff • = self::ET1|constructor#_#new#tearOff; |
| } |
| extension type ET2(core::int id) { |
| abstract extension-type-member representation-field get id() → core::int; |
| abstract extension-type-member representation-field get x() → core::int; |
| constructor • = self::ET2|constructor#; |
| constructor tearoff • = self::ET2|constructor#_#new#tearOff; |
| } |
| extension type ET3(core::int id) { |
| abstract extension-type-member representation-field get id() → core::int; |
| abstract extension-type-member representation-field get x() → core::int; |
| constructor • = self::ET3|constructor#; |
| constructor tearoff • = self::ET3|constructor#_#new#tearOff; |
| } |
| static extension-type-member method ET1|constructor#(core::int id) → self::ET1% /* erasure=core::int, declared=! */ |
| ; |
| static extension-type-member method ET1|constructor#_#new#tearOff(core::int id) → self::ET1% /* erasure=core::int, declared=! */ |
| return self::ET1|constructor#(id); |
| static extension-type-member method ET2|constructor#(core::int id) → self::ET2% /* erasure=core::int, declared=! */ |
| ; |
| static extension-type-member method ET2|constructor#_#new#tearOff(core::int id) → self::ET2% /* erasure=core::int, declared=! */ |
| return self::ET2|constructor#(id); |
| static extension-type-member method ET3|constructor#(core::int id) → self::ET3% /* erasure=core::int, declared=! */ |
| ; |
| static extension-type-member method ET3|constructor#_#new#tearOff(core::int id) → self::ET3% /* erasure=core::int, declared=! */ |
| return self::ET3|constructor#(id); |