| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_body.dart:6:3: Error: A const constructor can't have a body. |
| // Try removing either the 'const' keyword or the body. |
| // const ET.named(this.i) /* Error */ { |
| // ^^^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| extension type ET(core::int i) { |
| abstract extension-type-member representation-field get i() → core::int; |
| constructor • = self::ET|constructor#; |
| constructor tearoff • = self::ET|constructor#_#new#tearOff; |
| constructor named = self::ET|constructor#named; |
| constructor tearoff named = self::ET|constructor#_#named#tearOff; |
| } |
| static extension-type-member method ET|constructor#(core::int i) → self::ET% /* erasure=core::int, declared=! */ { |
| lowered final self::ET% /* erasure=core::int, declared=! */ #this = i; |
| return #this; |
| } |
| static extension-type-member method ET|constructor#_#new#tearOff(core::int i) → self::ET% /* erasure=core::int, declared=! */ |
| return self::ET|constructor#(i); |
| static extension-type-member method ET|constructor#named(core::int i) → self::ET% /* erasure=core::int, declared=! */ { |
| lowered final self::ET% /* erasure=core::int, declared=! */ #this = i; |
| { |
| core::print(#this as{Unchecked} core::int); |
| } |
| return #this; |
| } |
| static extension-type-member method ET|constructor#_#named#tearOff(core::int i) → self::ET% /* erasure=core::int, declared=! */ |
| return self::ET|constructor#named(i); |