| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:7:24: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| // Try using a constructor or factory that is 'const'. |
| // const implicitConst1 = ExtensionType1(0); /* Error */ |
| // ^^^^^^^^^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:8:28: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| // Try using a constructor or factory that is 'const'. |
| // var explicitConst1 = const ExtensionType1(0); /* Error */ |
| // ^^^^^^^^^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:9:19: Error: New expression is not a constant expression. |
| // const newConst1 = new ExtensionType1(0); /* Error */ |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:13:31: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| // Try using a constructor or factory that is 'const'. |
| // const implicitConstAliased1 = Typedef1(0); /* Error */ |
| // ^^^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:14:35: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| // Try using a constructor or factory that is 'const'. |
| // var explicitConstAliased1 = const Typedef1(0); /* Error */ |
| // ^^^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:15:26: Error: New expression is not a constant expression. |
| // const newConstAliased1 = new Typedef1(0); /* Error */ |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:21:19: Error: New expression is not a constant expression. |
| // const newConst2 = new ExtensionType2(0); /* Error */ |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:27:26: Error: New expression is not a constant expression. |
| // const newConstAliased2 = new Typedef2(0); /* Error */ |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:9:23: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| // Try using a constructor or factory that is 'const'. |
| // const newConst1 = new ExtensionType1(0); /* Error */ |
| // ^ |
| // |
| // pkg/front_end/testcases/extension_types/const_constructor_access.dart:15:30: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| // Try using a constructor or factory that is 'const'. |
| // const newConstAliased1 = new Typedef1(0); /* Error */ |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| typedef Typedef1<unrelated X extends core::Object? = dynamic> = self::ExtensionType1% /* erasure=core::int, declared=! */; |
| typedef Typedef2<unrelated X extends core::Object? = dynamic> = self::ExtensionType2% /* erasure=core::int, declared=! */; |
| extension type ExtensionType1(core::int i) { |
| abstract extension-type-member representation-field get i() → core::int; |
| constructor • = self::ExtensionType1|constructor#; |
| constructor tearoff • = self::ExtensionType1|constructor#_#new#tearOff; |
| } |
| extension type ExtensionType2(core::int i) { |
| abstract extension-type-member representation-field get i() → core::int; |
| constructor • = self::ExtensionType2|constructor#; |
| constructor tearoff • = self::ExtensionType2|constructor#_#new#tearOff; |
| } |
| static const field invalid-type implicitConst1 = invalid-expression "pkg/front_end/testcases/extension_types/const_constructor_access.dart:7:24: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| Try using a constructor or factory that is 'const'. |
| const implicitConst1 = ExtensionType1(0); /* Error */ |
| ^^^^^^^^^^^^^^"; |
| static field invalid-type explicitConst1 = invalid-expression "pkg/front_end/testcases/extension_types/const_constructor_access.dart:8:28: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| Try using a constructor or factory that is 'const'. |
| var explicitConst1 = const ExtensionType1(0); /* Error */ |
| ^^^^^^^^^^^^^^"; |
| static const field self::ExtensionType1% /* erasure=core::int, declared=! */ newConst1 = invalid-expression "pkg/front_end/testcases/extension_types/const_constructor_access.dart:9:23: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| Try using a constructor or factory that is 'const'. |
| const newConst1 = new ExtensionType1(0); /* Error */ |
| ^"; |
| static const field invalid-type implicitConstAliased1 = invalid-expression "pkg/front_end/testcases/extension_types/const_constructor_access.dart:13:31: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| Try using a constructor or factory that is 'const'. |
| const implicitConstAliased1 = Typedef1(0); /* Error */ |
| ^^^^^^^^"; |
| static field invalid-type explicitConstAliased1 = invalid-expression "pkg/front_end/testcases/extension_types/const_constructor_access.dart:14:35: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| Try using a constructor or factory that is 'const'. |
| var explicitConstAliased1 = const Typedef1(0); /* Error */ |
| ^^^^^^^^"; |
| static const field self::ExtensionType1% /* erasure=core::int, declared=! */ newConstAliased1 = invalid-expression "pkg/front_end/testcases/extension_types/const_constructor_access.dart:15:30: Error: Cannot invoke a non-'const' constructor where a const expression is expected. |
| Try using a constructor or factory that is 'const'. |
| const newConstAliased1 = new Typedef1(0); /* Error */ |
| ^"; |
| static const field self::ExtensionType2% /* erasure=core::int, declared=! */ implicitConst2 = #C1; |
| static field self::ExtensionType2% /* erasure=core::int, declared=! */ explicitConst2 = #C1; |
| static const field self::ExtensionType2% /* erasure=core::int, declared=! */ newConst2 = #C1; |
| static const field self::ExtensionType2% /* erasure=core::int, declared=! */ implicitConstAliased2 = #C1; |
| static field self::ExtensionType2% /* erasure=core::int, declared=! */ explicitConstAliased2 = #C1; |
| static const field self::ExtensionType2% /* erasure=core::int, declared=! */ newConstAliased2 = #C1; |
| static extension-type-member method ExtensionType1|constructor#(core::int i) → self::ExtensionType1% /* erasure=core::int, declared=! */ { |
| lowered final self::ExtensionType1% /* erasure=core::int, declared=! */ #this = i; |
| return #this; |
| } |
| static extension-type-member method ExtensionType1|constructor#_#new#tearOff(core::int i) → self::ExtensionType1% /* erasure=core::int, declared=! */ |
| return self::ExtensionType1|constructor#(i); |
| static extension-type-member method ExtensionType2|constructor#(core::int i) → self::ExtensionType2% /* erasure=core::int, declared=! */ { |
| lowered final self::ExtensionType2% /* erasure=core::int, declared=! */ #this = i; |
| return #this; |
| } |
| static extension-type-member method ExtensionType2|constructor#_#new#tearOff(core::int i) → self::ExtensionType2% /* erasure=core::int, declared=! */ |
| return self::ExtensionType2|constructor#(i); |
| static method _#Typedef1#new#tearOff<unrelated X extends core::Object? = dynamic>(core::int i) → self::ExtensionType1% /* erasure=core::int, declared=! */ |
| return self::ExtensionType1|constructor#(i); |
| static method _#Typedef2#new#tearOff<unrelated X extends core::Object? = dynamic>(core::int i) → self::ExtensionType2% /* erasure=core::int, declared=! */ |
| return self::ExtensionType2|constructor#(i); |
| |
| constants { |
| #C1 = 0 |
| } |