mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:20:31 +00:00
[cfe] Report error on bottom type used as representation type
Closes https://github.com/dart-lang/sdk/issues/53824 Part of https://github.com/dart-lang/sdk/issues/49731 Change-Id: I79776eb4f8b736f518898adff1078461895269f0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331660 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
This commit is contained in:
parent
216d98555c
commit
67d45616c6
33 changed files with 926 additions and 461 deletions
|
@ -4455,6 +4455,16 @@ const MessageCode messageExtensionTypeMemberOneOfContext = const MessageCode(
|
|||
problemMessage:
|
||||
r"""This is one of the inherited extension type members.""");
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codeExtensionTypeRepresentationTypeBottom =
|
||||
messageExtensionTypeRepresentationTypeBottom;
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const MessageCode messageExtensionTypeRepresentationTypeBottom =
|
||||
const MessageCode("ExtensionTypeRepresentationTypeBottom",
|
||||
analyzerCodes: <String>["EXTENSION_TYPE_REPRESENTATION_TYPE_BOTTOM"],
|
||||
problemMessage: r"""The representation type can't be a bottom type.""");
|
||||
|
||||
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
||||
const Code<Null> codeExtensionTypeWith = messageExtensionTypeWith;
|
||||
|
||||
|
|
|
@ -259,6 +259,14 @@ class SourceExtensionTypeDeclarationBuilder
|
|||
typeBuilder.fileUri);
|
||||
}
|
||||
}
|
||||
if (isBottom(representationType)) {
|
||||
libraryBuilder.addProblem(
|
||||
messageExtensionTypeRepresentationTypeBottom,
|
||||
representationFieldBuilder!.charOffset,
|
||||
representationFieldBuilder!.name.length,
|
||||
representationFieldBuilder!.fileUri);
|
||||
representationType = const InvalidType();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
representationType = const DynamicType();
|
||||
|
|
|
@ -7440,3 +7440,10 @@ ExtensionTypeConstructorWithSuperFormalParameter:
|
|||
script: |
|
||||
extension type A(int foo) { A.named(this.foo, super.bar); }
|
||||
analyzerCode: EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_FORMAL_PARAMETER
|
||||
|
||||
ExtensionTypeRepresentationTypeBottom:
|
||||
problemMessage: "The representation type can't be a bottom type."
|
||||
experiments: inline-class
|
||||
script: |
|
||||
extension type E1(Never foo) {}
|
||||
analyzerCode: EXTENSION_TYPE_REPRESENTATION_TYPE_BOTTOM
|
||||
|
|
|
@ -30,7 +30,7 @@ extension type ET_Null(Null it) implements Null /* Error */ {}
|
|||
|
||||
extension type ET_Dynamic(dynamic it) implements dynamic /* Error */ {}
|
||||
|
||||
extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
|
||||
extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
|
||||
|
@ -54,7 +54,7 @@ extension type ET_NullableExtensionType(int it)
|
|||
extension type ET_FutureOr(FutureOr<int> it)
|
||||
implements FutureOr<int> /* Error */ {}
|
||||
|
||||
extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
|
||||
extension type ET_TypeVariable<T>(T it) implements T /* Error */ {}
|
||||
|
||||
|
|
|
@ -2,18 +2,18 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' can't be used here.
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' can't be used here.
|
||||
// Try removing 'void' keyword or replace it with 'var', 'final', or a type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:29:44: Error: The type 'Null' can't be implemented by an extension type.
|
||||
// extension type ET_Null(Null it) implements Null /* Error */ {}
|
||||
|
@ -23,14 +23,18 @@ library;
|
|||
// extension type ET_Dynamic(dynamic it) implements dynamic /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:46: Error: The type 'Never' can't be implemented by an extension type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:31: Error: The representation type can't be a bottom type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:37:48: Error: The type 'Object' can't be implemented by an extension type.
|
||||
// extension type ET_Object(Object it) implements Object /* Error */ {}
|
||||
// ^
|
||||
|
@ -75,9 +79,9 @@ library;
|
|||
// implements FutureOr<int> /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:59:52: Error: The type variable 'T' can't be implemented by an extension type.
|
||||
// extension type ET_TypeVariable<T>(T it) implements T /* Error */ {}
|
||||
|
@ -126,12 +130,12 @@ extension type ET_Dynamic(dynamic it) {
|
|||
constructor • = self::ET_Dynamic|constructor#;
|
||||
constructor tearoff • = self::ET_Dynamic|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Void(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Void(Null it) {
|
||||
abstract inline-class-member representation-field get it() → Null;
|
||||
constructor • = self::ET_Void|constructor#;
|
||||
constructor tearoff • = self::ET_Void|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Never(Never it) {
|
||||
extension type ET_Never(invalid-type it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
constructor • = self::ET_Never|constructor#;
|
||||
constructor tearoff • = self::ET_Never|constructor#_#new#tearOff;
|
||||
|
@ -176,8 +180,8 @@ extension type ET_FutureOr(FutureOr<core::int>it) {
|
|||
constructor • = self::ET_FutureOr|constructor#;
|
||||
constructor tearoff • = self::ET_FutureOr|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Extension(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Extension(core::int it) {
|
||||
abstract inline-class-member representation-field get it() → core::int;
|
||||
constructor • = self::ET_Extension|constructor#;
|
||||
constructor tearoff • = self::ET_Extension|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -240,17 +244,17 @@ static inline-class-member method ET_Dynamic|constructor#(dynamic it) → self::
|
|||
}
|
||||
static inline-class-member method ET_Dynamic|constructor#_#new#tearOff(dynamic it) → self::ET_Dynamic /* = dynamic */
|
||||
return self::ET_Dynamic|constructor#(it);
|
||||
static inline-class-member method ET_Void|constructor#(Never it) → self::ET_Void /* = Never */ {
|
||||
lowered final self::ET_Void /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Void|constructor#(Null it) → self::ET_Void /* = Null */ {
|
||||
lowered final self::ET_Void /* = Null */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Never it) → self::ET_Void /* = Never */
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Null it) → self::ET_Void /* = Null */
|
||||
return self::ET_Void|constructor#(it);
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = Never */ {
|
||||
lowered final self::ET_Never /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = invalid-type */ {
|
||||
lowered final self::ET_Never /* = invalid-type */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = Never */
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = invalid-type */
|
||||
return self::ET_Never|constructor#(it);
|
||||
static inline-class-member method ET_Object|constructor#(core::Object it) → self::ET_Object /* = core::Object */ {
|
||||
lowered final self::ET_Object /* = core::Object */ #this = it;
|
||||
|
@ -300,10 +304,10 @@ static inline-class-member method ET_FutureOr|constructor#(FutureOr<core::int>it
|
|||
}
|
||||
static inline-class-member method ET_FutureOr|constructor#_#new#tearOff(FutureOr<core::int>it) → self::ET_FutureOr /* = FutureOr<core::int>*/
|
||||
return self::ET_FutureOr|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(Never it) → self::ET_Extension /* = Never */
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(core::int it) → self::ET_Extension /* = core::int */
|
||||
return self::ET_Extension|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#(Never it) → self::ET_Extension /* = Never */ {
|
||||
lowered final self::ET_Extension /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Extension|constructor#(core::int it) → self::ET_Extension /* = core::int */ {
|
||||
lowered final self::ET_Extension /* = core::int */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_TypeVariable|constructor#<T extends core::Object? = dynamic>(self::ET_TypeVariable|constructor#::T% it) → self::ET_TypeVariable<self::ET_TypeVariable|constructor#::T%> /* = self::ET_TypeVariable|constructor#::T% */ {
|
||||
|
|
|
@ -2,18 +2,18 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' can't be used here.
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' can't be used here.
|
||||
// Try removing 'void' keyword or replace it with 'var', 'final', or a type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:29:44: Error: The type 'Null' can't be implemented by an extension type.
|
||||
// extension type ET_Null(Null it) implements Null /* Error */ {}
|
||||
|
@ -23,14 +23,18 @@ library;
|
|||
// extension type ET_Dynamic(dynamic it) implements dynamic /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:46: Error: The type 'Never' can't be implemented by an extension type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:31: Error: The representation type can't be a bottom type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:37:48: Error: The type 'Object' can't be implemented by an extension type.
|
||||
// extension type ET_Object(Object it) implements Object /* Error */ {}
|
||||
// ^
|
||||
|
@ -75,9 +79,9 @@ library;
|
|||
// implements FutureOr<int> /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:59:52: Error: The type variable 'T' can't be implemented by an extension type.
|
||||
// extension type ET_TypeVariable<T>(T it) implements T /* Error */ {}
|
||||
|
@ -126,12 +130,12 @@ extension type ET_Dynamic(dynamic it) {
|
|||
constructor • = self::ET_Dynamic|constructor#;
|
||||
constructor tearoff • = self::ET_Dynamic|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Void(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Void(Null it) {
|
||||
abstract inline-class-member representation-field get it() → Null;
|
||||
constructor • = self::ET_Void|constructor#;
|
||||
constructor tearoff • = self::ET_Void|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Never(Never it) {
|
||||
extension type ET_Never(invalid-type it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
constructor • = self::ET_Never|constructor#;
|
||||
constructor tearoff • = self::ET_Never|constructor#_#new#tearOff;
|
||||
|
@ -176,8 +180,8 @@ extension type ET_FutureOr(FutureOr<core::int>it) {
|
|||
constructor • = self::ET_FutureOr|constructor#;
|
||||
constructor tearoff • = self::ET_FutureOr|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Extension(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Extension(core::int it) {
|
||||
abstract inline-class-member representation-field get it() → core::int;
|
||||
constructor • = self::ET_Extension|constructor#;
|
||||
constructor tearoff • = self::ET_Extension|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -240,17 +244,17 @@ static inline-class-member method ET_Dynamic|constructor#(dynamic it) → self::
|
|||
}
|
||||
static inline-class-member method ET_Dynamic|constructor#_#new#tearOff(dynamic it) → self::ET_Dynamic /* = dynamic */
|
||||
return self::ET_Dynamic|constructor#(it);
|
||||
static inline-class-member method ET_Void|constructor#(Never it) → self::ET_Void /* = Never */ {
|
||||
lowered final self::ET_Void /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Void|constructor#(Null it) → self::ET_Void /* = Null */ {
|
||||
lowered final self::ET_Void /* = Null */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Never it) → self::ET_Void /* = Never */
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Null it) → self::ET_Void /* = Null */
|
||||
return self::ET_Void|constructor#(it);
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = Never */ {
|
||||
lowered final self::ET_Never /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = invalid-type */ {
|
||||
lowered final self::ET_Never /* = invalid-type */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = Never */
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = invalid-type */
|
||||
return self::ET_Never|constructor#(it);
|
||||
static inline-class-member method ET_Object|constructor#(core::Object it) → self::ET_Object /* = core::Object */ {
|
||||
lowered final self::ET_Object /* = core::Object */ #this = it;
|
||||
|
@ -300,10 +304,10 @@ static inline-class-member method ET_FutureOr|constructor#(FutureOr<core::int>it
|
|||
}
|
||||
static inline-class-member method ET_FutureOr|constructor#_#new#tearOff(FutureOr<core::int>it) → self::ET_FutureOr /* = FutureOr<core::int>*/
|
||||
return self::ET_FutureOr|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(Never it) → self::ET_Extension /* = Never */
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(core::int it) → self::ET_Extension /* = core::int */
|
||||
return self::ET_Extension|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#(Never it) → self::ET_Extension /* = Never */ {
|
||||
lowered final self::ET_Extension /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Extension|constructor#(core::int it) → self::ET_Extension /* = core::int */ {
|
||||
lowered final self::ET_Extension /* = core::int */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_TypeVariable|constructor#<T extends core::Object? = dynamic>(self::ET_TypeVariable|constructor#::T% it) → self::ET_TypeVariable<self::ET_TypeVariable|constructor#::T%> /* = self::ET_TypeVariable|constructor#::T% */ {
|
||||
|
|
|
@ -12,7 +12,7 @@ extension type ExtensionType(int it) {}
|
|||
extension type GenericExtensionType<T>(T it) {}
|
||||
extension type ET_Null(Null it) implements Null {}
|
||||
extension type ET_Dynamic(dynamic it) implements dynamic {}
|
||||
extension type ET_Void(Never it) implements void {}
|
||||
extension type ET_Void(Null it) implements void {}
|
||||
extension type ET_Never(Never it) implements Never {}
|
||||
extension type ET_Object(Object it) implements Object {}
|
||||
extension type ET_Record(Record it) implements Record {}
|
||||
|
@ -22,7 +22,7 @@ extension type ET_FunctionType(FunctionType it) implements FunctionType {}
|
|||
extension type ET_NullableInterfaceType(NullableInterfaceType it) implements NullableInterfaceType {}
|
||||
extension type ET_NullableExtensionType(int it) implements NullableExtensionType {}
|
||||
extension type ET_FutureOr(FutureOr<int> it) implements FutureOr<int> {}
|
||||
extension type ET_Extension(Never it) implements Extension {}
|
||||
extension type ET_Extension(int it) implements Extension {}
|
||||
extension type ET_TypeVariable<T>(T it) implements T {}
|
||||
extension type ET_Class(Class it) implements Class {}
|
||||
extension type ET_GenericClass<T>(GenericClass<T> it) implements GenericClass<T> {}
|
||||
|
|
|
@ -5,7 +5,7 @@ extension Extension on int {}
|
|||
extension type ET_Alias(Alias it) implements Alias {}
|
||||
extension type ET_Class(Class it) implements Class {}
|
||||
extension type ET_Dynamic(dynamic it) implements dynamic {}
|
||||
extension type ET_Extension(Never it) implements Extension {}
|
||||
extension type ET_Extension(int it) implements Extension {}
|
||||
extension type ET_ExtensionType(int it) implements ExtensionType {}
|
||||
extension type ET_Function(Function it) implements Function {}
|
||||
extension type ET_FunctionType(FunctionType it) implements FunctionType {}
|
||||
|
@ -21,7 +21,7 @@ extension type ET_Object(Object it) implements Object {}
|
|||
extension type ET_Record(Record it) implements Record {}
|
||||
extension type ET_RecordType(RecordType it) implements RecordType {}
|
||||
extension type ET_TypeVariable<T>(T it) implements T {}
|
||||
extension type ET_Void(Never it) implements void {}
|
||||
extension type ET_Void(Null it) implements void {}
|
||||
extension type ExtensionType(int it) {}
|
||||
extension type GenericExtensionType<T>(T it) {}
|
||||
typedef Alias = Class;
|
||||
|
|
|
@ -2,18 +2,18 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' can't be used here.
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' can't be used here.
|
||||
// Try removing 'void' keyword or replace it with 'var', 'final', or a type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:29:44: Error: The type 'Null' can't be implemented by an extension type.
|
||||
// extension type ET_Null(Null it) implements Null /* Error */ {}
|
||||
|
@ -23,14 +23,18 @@ library;
|
|||
// extension type ET_Dynamic(dynamic it) implements dynamic /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:46: Error: The type 'Never' can't be implemented by an extension type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:31: Error: The representation type can't be a bottom type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:37:48: Error: The type 'Object' can't be implemented by an extension type.
|
||||
// extension type ET_Object(Object it) implements Object /* Error */ {}
|
||||
// ^
|
||||
|
@ -75,9 +79,9 @@ library;
|
|||
// implements FutureOr<int> /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:59:52: Error: The type variable 'T' can't be implemented by an extension type.
|
||||
// extension type ET_TypeVariable<T>(T it) implements T /* Error */ {}
|
||||
|
@ -126,12 +130,12 @@ extension type ET_Dynamic(dynamic it) {
|
|||
constructor • = self::ET_Dynamic|constructor#;
|
||||
constructor tearoff • = self::ET_Dynamic|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Void(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Void(Null it) {
|
||||
abstract inline-class-member representation-field get it() → Null;
|
||||
constructor • = self::ET_Void|constructor#;
|
||||
constructor tearoff • = self::ET_Void|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Never(Never it) {
|
||||
extension type ET_Never(invalid-type it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
constructor • = self::ET_Never|constructor#;
|
||||
constructor tearoff • = self::ET_Never|constructor#_#new#tearOff;
|
||||
|
@ -176,8 +180,8 @@ extension type ET_FutureOr(FutureOr<core::int>it) {
|
|||
constructor • = self::ET_FutureOr|constructor#;
|
||||
constructor tearoff • = self::ET_FutureOr|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Extension(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Extension(core::int it) {
|
||||
abstract inline-class-member representation-field get it() → core::int;
|
||||
constructor • = self::ET_Extension|constructor#;
|
||||
constructor tearoff • = self::ET_Extension|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -240,17 +244,17 @@ static inline-class-member method ET_Dynamic|constructor#(dynamic it) → self::
|
|||
}
|
||||
static inline-class-member method ET_Dynamic|constructor#_#new#tearOff(dynamic it) → self::ET_Dynamic /* = dynamic */
|
||||
return self::ET_Dynamic|constructor#(it);
|
||||
static inline-class-member method ET_Void|constructor#(Never it) → self::ET_Void /* = Never */ {
|
||||
lowered final self::ET_Void /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Void|constructor#(Null it) → self::ET_Void /* = Null */ {
|
||||
lowered final self::ET_Void /* = Null */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Never it) → self::ET_Void /* = Never */
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Null it) → self::ET_Void /* = Null */
|
||||
return self::ET_Void|constructor#(it);
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = Never */ {
|
||||
lowered final self::ET_Never /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = invalid-type */ {
|
||||
lowered final self::ET_Never /* = invalid-type */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = Never */
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = invalid-type */
|
||||
return self::ET_Never|constructor#(it);
|
||||
static inline-class-member method ET_Object|constructor#(core::Object it) → self::ET_Object /* = core::Object */ {
|
||||
lowered final self::ET_Object /* = core::Object */ #this = it;
|
||||
|
@ -300,10 +304,10 @@ static inline-class-member method ET_FutureOr|constructor#(FutureOr<core::int>it
|
|||
}
|
||||
static inline-class-member method ET_FutureOr|constructor#_#new#tearOff(FutureOr<core::int>it) → self::ET_FutureOr /* = FutureOr<core::int>*/
|
||||
return self::ET_FutureOr|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(Never it) → self::ET_Extension /* = Never */
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(core::int it) → self::ET_Extension /* = core::int */
|
||||
return self::ET_Extension|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#(Never it) → self::ET_Extension /* = Never */ {
|
||||
lowered final self::ET_Extension /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Extension|constructor#(core::int it) → self::ET_Extension /* = core::int */ {
|
||||
lowered final self::ET_Extension /* = core::int */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_TypeVariable|constructor#<T extends core::Object? = dynamic>(self::ET_TypeVariable|constructor#::T% it) → self::ET_TypeVariable<self::ET_TypeVariable|constructor#::T%> /* = self::ET_TypeVariable|constructor#::T% */ {
|
||||
|
|
|
@ -2,18 +2,18 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' can't be used here.
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' can't be used here.
|
||||
// Try removing 'void' keyword or replace it with 'var', 'final', or a type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:29:44: Error: The type 'Null' can't be implemented by an extension type.
|
||||
// extension type ET_Null(Null it) implements Null /* Error */ {}
|
||||
|
@ -23,14 +23,18 @@ library;
|
|||
// extension type ET_Dynamic(dynamic it) implements dynamic /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:46: Error: The type 'Never' can't be implemented by an extension type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:31: Error: The representation type can't be a bottom type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:37:48: Error: The type 'Object' can't be implemented by an extension type.
|
||||
// extension type ET_Object(Object it) implements Object /* Error */ {}
|
||||
// ^
|
||||
|
@ -75,9 +79,9 @@ library;
|
|||
// implements FutureOr<int> /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:59:52: Error: The type variable 'T' can't be implemented by an extension type.
|
||||
// extension type ET_TypeVariable<T>(T it) implements T /* Error */ {}
|
||||
|
@ -126,12 +130,12 @@ extension type ET_Dynamic(dynamic it) {
|
|||
constructor • = self::ET_Dynamic|constructor#;
|
||||
constructor tearoff • = self::ET_Dynamic|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Void(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Void(Null it) {
|
||||
abstract inline-class-member representation-field get it() → Null;
|
||||
constructor • = self::ET_Void|constructor#;
|
||||
constructor tearoff • = self::ET_Void|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Never(Never it) {
|
||||
extension type ET_Never(invalid-type it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
constructor • = self::ET_Never|constructor#;
|
||||
constructor tearoff • = self::ET_Never|constructor#_#new#tearOff;
|
||||
|
@ -176,8 +180,8 @@ extension type ET_FutureOr(FutureOr<core::int>it) {
|
|||
constructor • = self::ET_FutureOr|constructor#;
|
||||
constructor tearoff • = self::ET_FutureOr|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Extension(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Extension(core::int it) {
|
||||
abstract inline-class-member representation-field get it() → core::int;
|
||||
constructor • = self::ET_Extension|constructor#;
|
||||
constructor tearoff • = self::ET_Extension|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -240,17 +244,17 @@ static inline-class-member method ET_Dynamic|constructor#(dynamic it) → self::
|
|||
}
|
||||
static inline-class-member method ET_Dynamic|constructor#_#new#tearOff(dynamic it) → self::ET_Dynamic /* = dynamic */
|
||||
return self::ET_Dynamic|constructor#(it);
|
||||
static inline-class-member method ET_Void|constructor#(Never it) → self::ET_Void /* = Never */ {
|
||||
lowered final self::ET_Void /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Void|constructor#(Null it) → self::ET_Void /* = Null */ {
|
||||
lowered final self::ET_Void /* = Null */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Never it) → self::ET_Void /* = Never */
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Null it) → self::ET_Void /* = Null */
|
||||
return self::ET_Void|constructor#(it);
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = Never */ {
|
||||
lowered final self::ET_Never /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = invalid-type */ {
|
||||
lowered final self::ET_Never /* = invalid-type */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = Never */
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = invalid-type */
|
||||
return self::ET_Never|constructor#(it);
|
||||
static inline-class-member method ET_Object|constructor#(core::Object it) → self::ET_Object /* = core::Object */ {
|
||||
lowered final self::ET_Object /* = core::Object */ #this = it;
|
||||
|
@ -300,10 +304,10 @@ static inline-class-member method ET_FutureOr|constructor#(FutureOr<core::int>it
|
|||
}
|
||||
static inline-class-member method ET_FutureOr|constructor#_#new#tearOff(FutureOr<core::int>it) → self::ET_FutureOr /* = FutureOr<core::int>*/
|
||||
return self::ET_FutureOr|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(Never it) → self::ET_Extension /* = Never */
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(core::int it) → self::ET_Extension /* = core::int */
|
||||
return self::ET_Extension|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#(Never it) → self::ET_Extension /* = Never */ {
|
||||
lowered final self::ET_Extension /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Extension|constructor#(core::int it) → self::ET_Extension /* = core::int */ {
|
||||
lowered final self::ET_Extension /* = core::int */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_TypeVariable|constructor#<T extends core::Object? = dynamic>(self::ET_TypeVariable|constructor#::T% it) → self::ET_TypeVariable<self::ET_TypeVariable|constructor#::T%> /* = self::ET_TypeVariable|constructor#::T% */ {
|
||||
|
|
|
@ -2,18 +2,18 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' can't be used here.
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' can't be used here.
|
||||
// Try removing 'void' keyword or replace it with 'var', 'final', or a type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:29:44: Error: The type 'Null' can't be implemented by an extension type.
|
||||
// extension type ET_Null(Null it) implements Null /* Error */ {}
|
||||
|
@ -23,14 +23,18 @@ library;
|
|||
// extension type ET_Dynamic(dynamic it) implements dynamic /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:46: Error: The type 'Never' can't be implemented by an extension type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:31: Error: The representation type can't be a bottom type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:37:48: Error: The type 'Object' can't be implemented by an extension type.
|
||||
// extension type ET_Object(Object it) implements Object /* Error */ {}
|
||||
// ^
|
||||
|
@ -75,9 +79,9 @@ library;
|
|||
// implements FutureOr<int> /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:59:52: Error: The type variable 'T' can't be implemented by an extension type.
|
||||
// extension type ET_TypeVariable<T>(T it) implements T /* Error */ {}
|
||||
|
@ -124,12 +128,12 @@ extension type ET_Dynamic(dynamic it) {
|
|||
constructor • = self::ET_Dynamic|constructor#;
|
||||
constructor tearoff • = self::ET_Dynamic|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Void(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Void(Null it) {
|
||||
abstract inline-class-member representation-field get it() → Null;
|
||||
constructor • = self::ET_Void|constructor#;
|
||||
constructor tearoff • = self::ET_Void|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Never(Never it) {
|
||||
extension type ET_Never(invalid-type it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
constructor • = self::ET_Never|constructor#;
|
||||
constructor tearoff • = self::ET_Never|constructor#_#new#tearOff;
|
||||
|
@ -174,8 +178,8 @@ extension type ET_FutureOr(FutureOr<core::int>it) {
|
|||
constructor • = self::ET_FutureOr|constructor#;
|
||||
constructor tearoff • = self::ET_FutureOr|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Extension(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Extension(core::int it) {
|
||||
abstract inline-class-member representation-field get it() → core::int;
|
||||
constructor • = self::ET_Extension|constructor#;
|
||||
constructor tearoff • = self::ET_Extension|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -230,13 +234,13 @@ static inline-class-member method ET_Dynamic|constructor#(dynamic it) → self::
|
|||
;
|
||||
static inline-class-member method ET_Dynamic|constructor#_#new#tearOff(dynamic it) → self::ET_Dynamic /* = dynamic */
|
||||
return self::ET_Dynamic|constructor#(it);
|
||||
static inline-class-member method ET_Void|constructor#(Never it) → self::ET_Void /* = Never */
|
||||
static inline-class-member method ET_Void|constructor#(Null it) → self::ET_Void /* = Null */
|
||||
;
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Never it) → self::ET_Void /* = Never */
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Null it) → self::ET_Void /* = Null */
|
||||
return self::ET_Void|constructor#(it);
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = Never */
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = invalid-type */
|
||||
;
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = Never */
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = invalid-type */
|
||||
return self::ET_Never|constructor#(it);
|
||||
static inline-class-member method ET_Object|constructor#(core::Object it) → self::ET_Object /* = core::Object */
|
||||
;
|
||||
|
@ -270,9 +274,9 @@ static inline-class-member method ET_FutureOr|constructor#(FutureOr<core::int>it
|
|||
;
|
||||
static inline-class-member method ET_FutureOr|constructor#_#new#tearOff(FutureOr<core::int>it) → self::ET_FutureOr /* = FutureOr<core::int>*/
|
||||
return self::ET_FutureOr|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(Never it) → self::ET_Extension /* = Never */
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(core::int it) → self::ET_Extension /* = core::int */
|
||||
return self::ET_Extension|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#(Never it) → self::ET_Extension /* = Never */
|
||||
static inline-class-member method ET_Extension|constructor#(core::int it) → self::ET_Extension /* = core::int */
|
||||
;
|
||||
static inline-class-member method ET_TypeVariable|constructor#<T extends core::Object? = dynamic>(self::ET_TypeVariable|constructor#::T% it) → self::ET_TypeVariable<self::ET_TypeVariable|constructor#::T%> /* = self::ET_TypeVariable|constructor#::T% */
|
||||
;
|
||||
|
|
|
@ -2,18 +2,18 @@ library;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' can't be used here.
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' can't be used here.
|
||||
// Try removing 'void' keyword or replace it with 'var', 'final', or a type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: Type 'void' not found.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: 'Extension' isn't a type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^^^^^^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:29:44: Error: The type 'Null' can't be implemented by an extension type.
|
||||
// extension type ET_Null(Null it) implements Null /* Error */ {}
|
||||
|
@ -23,14 +23,18 @@ library;
|
|||
// extension type ET_Dynamic(dynamic it) implements dynamic /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:45: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Never it) implements void /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:33:44: Error: The type 'void' can't be implemented by an extension type.
|
||||
// extension type ET_Void(Null it) implements void /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:46: Error: The type 'Never' can't be implemented by an extension type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:35:31: Error: The representation type can't be a bottom type.
|
||||
// extension type ET_Never(Never it) implements Never /* Error */ {}
|
||||
// ^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:37:48: Error: The type 'Object' can't be implemented by an extension type.
|
||||
// extension type ET_Object(Object it) implements Object /* Error */ {}
|
||||
// ^
|
||||
|
@ -75,9 +79,9 @@ library;
|
|||
// implements FutureOr<int> /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:50: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(Never it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:57:48: Error: The type 'Extension' can't be implemented by an extension type.
|
||||
// extension type ET_Extension(int it) implements Extension /* Error */ {}
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implement_all.dart:59:52: Error: The type variable 'T' can't be implemented by an extension type.
|
||||
// extension type ET_TypeVariable<T>(T it) implements T /* Error */ {}
|
||||
|
@ -126,12 +130,12 @@ extension type ET_Dynamic(dynamic it) {
|
|||
constructor • = self::ET_Dynamic|constructor#;
|
||||
constructor tearoff • = self::ET_Dynamic|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Void(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Void(Null it) {
|
||||
abstract inline-class-member representation-field get it() → Null;
|
||||
constructor • = self::ET_Void|constructor#;
|
||||
constructor tearoff • = self::ET_Void|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Never(Never it) {
|
||||
extension type ET_Never(invalid-type it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
constructor • = self::ET_Never|constructor#;
|
||||
constructor tearoff • = self::ET_Never|constructor#_#new#tearOff;
|
||||
|
@ -176,8 +180,8 @@ extension type ET_FutureOr(FutureOr<core::int>it) {
|
|||
constructor • = self::ET_FutureOr|constructor#;
|
||||
constructor tearoff • = self::ET_FutureOr|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ET_Extension(Never it) {
|
||||
abstract inline-class-member representation-field get it() → Never;
|
||||
extension type ET_Extension(core::int it) {
|
||||
abstract inline-class-member representation-field get it() → core::int;
|
||||
constructor • = self::ET_Extension|constructor#;
|
||||
constructor tearoff • = self::ET_Extension|constructor#_#new#tearOff;
|
||||
}
|
||||
|
@ -240,17 +244,17 @@ static inline-class-member method ET_Dynamic|constructor#(dynamic it) → self::
|
|||
}
|
||||
static inline-class-member method ET_Dynamic|constructor#_#new#tearOff(dynamic it) → self::ET_Dynamic /* = dynamic */
|
||||
return self::ET_Dynamic|constructor#(it);
|
||||
static inline-class-member method ET_Void|constructor#(Never it) → self::ET_Void /* = Never */ {
|
||||
lowered final self::ET_Void /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Void|constructor#(Null it) → self::ET_Void /* = Null */ {
|
||||
lowered final self::ET_Void /* = Null */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Never it) → self::ET_Void /* = Never */
|
||||
static inline-class-member method ET_Void|constructor#_#new#tearOff(Null it) → self::ET_Void /* = Null */
|
||||
return self::ET_Void|constructor#(it);
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = Never */ {
|
||||
lowered final self::ET_Never /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Never|constructor#(Never it) → self::ET_Never /* = invalid-type */ {
|
||||
lowered final self::ET_Never /* = invalid-type */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = Never */
|
||||
static inline-class-member method ET_Never|constructor#_#new#tearOff(Never it) → self::ET_Never /* = invalid-type */
|
||||
return self::ET_Never|constructor#(it);
|
||||
static inline-class-member method ET_Object|constructor#(core::Object it) → self::ET_Object /* = core::Object */ {
|
||||
lowered final self::ET_Object /* = core::Object */ #this = it;
|
||||
|
@ -300,10 +304,10 @@ static inline-class-member method ET_FutureOr|constructor#(FutureOr<core::int>it
|
|||
}
|
||||
static inline-class-member method ET_FutureOr|constructor#_#new#tearOff(FutureOr<core::int>it) → self::ET_FutureOr /* = FutureOr<core::int>*/
|
||||
return self::ET_FutureOr|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(Never it) → self::ET_Extension /* = Never */
|
||||
static inline-class-member method ET_Extension|constructor#_#new#tearOff(core::int it) → self::ET_Extension /* = core::int */
|
||||
return self::ET_Extension|constructor#(it);
|
||||
static inline-class-member method ET_Extension|constructor#(Never it) → self::ET_Extension /* = Never */ {
|
||||
lowered final self::ET_Extension /* = Never */ #this = it;
|
||||
static inline-class-member method ET_Extension|constructor#(core::int it) → self::ET_Extension /* = core::int */ {
|
||||
lowered final self::ET_Extension /* = core::int */ #this = it;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ET_TypeVariable|constructor#<T extends core::Object? = dynamic>(self::ET_TypeVariable|constructor#::T% it) → self::ET_TypeVariable<self::ET_TypeVariable|constructor#::T%> /* = self::ET_TypeVariable|constructor#::T% */ {
|
||||
|
|
|
@ -70,7 +70,7 @@ extension type ExtensionType9(int i) {
|
|||
extension type ExtensionType9a(Never n) /* Error */
|
||||
implements ClassJ, ClassK {}
|
||||
|
||||
extension type ExtensionType9b(Never n) /* Ok */
|
||||
extension type ExtensionType9b(Never n) /* Error */
|
||||
implements ClassJ, ClassK {
|
||||
int get method4 => 42; /* Ok */
|
||||
void set method4(int value) {} /* Ok */
|
||||
|
@ -85,7 +85,7 @@ extension type ExtensionType10b(int i) /* Ok */
|
|||
void set method4(int value) {} /* Ok */
|
||||
}
|
||||
|
||||
extension type ExtensionType11(Never n) {
|
||||
extension type ExtensionType11(Null n) {
|
||||
int get property => 42; /* Error */
|
||||
void set property(String value) {} /* Error */
|
||||
}
|
||||
|
@ -94,17 +94,17 @@ extension type ExtensionType11(Never n) {
|
|||
extension type ExtensionType12a(Never n) /* Error */
|
||||
implements ClassL, ClassM {}
|
||||
|
||||
extension type ExtensionType12b(Never n) /* Error */
|
||||
extension type ExtensionType12b(ClassL n) /* Error */
|
||||
implements ClassL {
|
||||
void set property(bool value) {} /* Error */
|
||||
}
|
||||
|
||||
extension type ExtensionType12c(Never n) /* Error */
|
||||
extension type ExtensionType12c(ClassM n) /* Error */
|
||||
implements ClassM {
|
||||
bool get property => true; /* Error */
|
||||
}
|
||||
|
||||
extension type ExtensionType12d(Never n) /* Ok */
|
||||
extension type ExtensionType12d(Never n) /* Error */
|
||||
implements ClassL, ClassM {
|
||||
bool get property => true; /* Ok */
|
||||
void set property(bool value) {} /* Ok */
|
||||
|
|
|
@ -10,6 +10,22 @@ library;
|
|||
// void method4() {} /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:73:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9b(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:94:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:107:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12d(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member.
|
||||
// Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict.
|
||||
// extension type ExtensionType1a(ClassA c) /* Error */
|
||||
|
@ -217,12 +233,12 @@ extension type ExtensionType9(core::int i) {
|
|||
constructor • = self::ExtensionType9|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9a(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9a(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType9a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9b(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9b(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get method4 = self::ExtensionType9b|get#method4;
|
||||
set method4 = self::ExtensionType9b|set#method4;
|
||||
|
@ -241,31 +257,31 @@ extension type ExtensionType10b(core::int i) implements imp::ExtensionTypeJ /* =
|
|||
constructor • = self::ExtensionType10b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType10b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType11(Never n) {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType11(Null n) {
|
||||
abstract inline-class-member representation-field get n() → Null;
|
||||
get property = self::ExtensionType11|get#property;
|
||||
set property = self::ExtensionType11|set#property;
|
||||
constructor • = self::ExtensionType11|constructor#;
|
||||
constructor tearoff • = self::ExtensionType11|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12a(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12a(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType12a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12b(Never n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12b(imp::ClassL n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassL;
|
||||
set property = self::ExtensionType12b|set#property;
|
||||
constructor • = self::ExtensionType12b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12c(Never n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12c(imp::ClassM n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassM;
|
||||
get property = self::ExtensionType12c|get#property;
|
||||
constructor • = self::ExtensionType12c|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12c|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12d(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12d(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get property = self::ExtensionType12d|get#property;
|
||||
set property = self::ExtensionType12d|set#property;
|
||||
|
@ -414,21 +430,21 @@ static inline-class-member method ExtensionType9|method4(lowered final self::Ext
|
|||
static inline-class-member method ExtensionType9|get#method4(lowered final self::ExtensionType9 /* = core::int */ #this) → () → void
|
||||
return () → void => self::ExtensionType9|method4(#this);
|
||||
static inline-class-member method ExtensionType9|set#method4(lowered final self::ExtensionType9 /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = Never */ {
|
||||
lowered final self::ExtensionType9a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = Never */
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = invalid-type */
|
||||
return self::ExtensionType9a|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = Never */ {
|
||||
lowered final self::ExtensionType9b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9b /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = Never */
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = invalid-type */
|
||||
return self::ExtensionType9b|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = Never */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType10a|constructor#(core::int i) → self::ExtensionType10a /* = core::int */ {
|
||||
lowered final self::ExtensionType10a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
@ -444,45 +460,45 @@ static inline-class-member method ExtensionType10b|constructor#(core::int i) →
|
|||
static inline-class-member method ExtensionType10b|get#method4(lowered final self::ExtensionType10b /* = core::int */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType10b|set#method4(lowered final self::ExtensionType10b /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType11|constructor#(Never n) → self::ExtensionType11 /* = Never */ {
|
||||
lowered final self::ExtensionType11 /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|constructor#(Null n) → self::ExtensionType11 /* = Null */ {
|
||||
lowered final self::ExtensionType11 /* = Null */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Never n) → self::ExtensionType11 /* = Never */
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Null n) → self::ExtensionType11 /* = Null */
|
||||
return self::ExtensionType11|constructor#(n);
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Null */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Never */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = Never */ {
|
||||
lowered final self::ExtensionType12a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Null */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = Never */
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = invalid-type */
|
||||
return self::ExtensionType12a|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|constructor#(Never n) → self::ExtensionType12b /* = Never */ {
|
||||
lowered final self::ExtensionType12b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|constructor#(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */ {
|
||||
lowered final self::ExtensionType12b /* = imp::ClassL */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(Never n) → self::ExtensionType12b /* = Never */
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */
|
||||
return self::ExtensionType12b|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(Never n) → self::ExtensionType12c /* = Never */ {
|
||||
lowered final self::ExtensionType12c /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = imp::ClassL */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */ {
|
||||
lowered final self::ExtensionType12c /* = imp::ClassM */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(Never n) → self::ExtensionType12c /* = Never */
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */
|
||||
return self::ExtensionType12c|constructor#(n);
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = imp::ClassM */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = Never */ {
|
||||
lowered final self::ExtensionType12d /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12d /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = Never */
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = invalid-type */
|
||||
return self::ExtensionType12d|constructor#(n);
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = invalid-type */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = invalid-type */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType13a|constructor#(core::int i) → self::ExtensionType13a /* = core::int */ {
|
||||
lowered final self::ExtensionType13a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
|
|
@ -10,6 +10,22 @@ library;
|
|||
// void method4() {} /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:73:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9b(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:94:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:107:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12d(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member.
|
||||
// Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict.
|
||||
// extension type ExtensionType1a(ClassA c) /* Error */
|
||||
|
@ -217,12 +233,12 @@ extension type ExtensionType9(core::int i) {
|
|||
constructor • = self::ExtensionType9|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9a(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9a(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType9a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9b(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9b(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get method4 = self::ExtensionType9b|get#method4;
|
||||
set method4 = self::ExtensionType9b|set#method4;
|
||||
|
@ -241,31 +257,31 @@ extension type ExtensionType10b(core::int i) implements imp::ExtensionTypeJ /* =
|
|||
constructor • = self::ExtensionType10b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType10b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType11(Never n) {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType11(Null n) {
|
||||
abstract inline-class-member representation-field get n() → Null;
|
||||
get property = self::ExtensionType11|get#property;
|
||||
set property = self::ExtensionType11|set#property;
|
||||
constructor • = self::ExtensionType11|constructor#;
|
||||
constructor tearoff • = self::ExtensionType11|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12a(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12a(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType12a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12b(Never n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12b(imp::ClassL n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassL;
|
||||
set property = self::ExtensionType12b|set#property;
|
||||
constructor • = self::ExtensionType12b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12c(Never n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12c(imp::ClassM n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassM;
|
||||
get property = self::ExtensionType12c|get#property;
|
||||
constructor • = self::ExtensionType12c|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12c|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12d(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12d(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get property = self::ExtensionType12d|get#property;
|
||||
set property = self::ExtensionType12d|set#property;
|
||||
|
@ -414,21 +430,21 @@ static inline-class-member method ExtensionType9|method4(lowered final self::Ext
|
|||
static inline-class-member method ExtensionType9|get#method4(lowered final self::ExtensionType9 /* = core::int */ #this) → () → void
|
||||
return () → void => self::ExtensionType9|method4(#this);
|
||||
static inline-class-member method ExtensionType9|set#method4(lowered final self::ExtensionType9 /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = Never */ {
|
||||
lowered final self::ExtensionType9a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = Never */
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = invalid-type */
|
||||
return self::ExtensionType9a|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = Never */ {
|
||||
lowered final self::ExtensionType9b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9b /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = Never */
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = invalid-type */
|
||||
return self::ExtensionType9b|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = Never */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType10a|constructor#(core::int i) → self::ExtensionType10a /* = core::int */ {
|
||||
lowered final self::ExtensionType10a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
@ -444,45 +460,45 @@ static inline-class-member method ExtensionType10b|constructor#(core::int i) →
|
|||
static inline-class-member method ExtensionType10b|get#method4(lowered final self::ExtensionType10b /* = core::int */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType10b|set#method4(lowered final self::ExtensionType10b /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType11|constructor#(Never n) → self::ExtensionType11 /* = Never */ {
|
||||
lowered final self::ExtensionType11 /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|constructor#(Null n) → self::ExtensionType11 /* = Null */ {
|
||||
lowered final self::ExtensionType11 /* = Null */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Never n) → self::ExtensionType11 /* = Never */
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Null n) → self::ExtensionType11 /* = Null */
|
||||
return self::ExtensionType11|constructor#(n);
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Null */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Never */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = Never */ {
|
||||
lowered final self::ExtensionType12a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Null */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = Never */
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = invalid-type */
|
||||
return self::ExtensionType12a|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|constructor#(Never n) → self::ExtensionType12b /* = Never */ {
|
||||
lowered final self::ExtensionType12b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|constructor#(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */ {
|
||||
lowered final self::ExtensionType12b /* = imp::ClassL */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(Never n) → self::ExtensionType12b /* = Never */
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */
|
||||
return self::ExtensionType12b|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(Never n) → self::ExtensionType12c /* = Never */ {
|
||||
lowered final self::ExtensionType12c /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = imp::ClassL */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */ {
|
||||
lowered final self::ExtensionType12c /* = imp::ClassM */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(Never n) → self::ExtensionType12c /* = Never */
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */
|
||||
return self::ExtensionType12c|constructor#(n);
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = imp::ClassM */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = Never */ {
|
||||
lowered final self::ExtensionType12d /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12d /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = Never */
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = invalid-type */
|
||||
return self::ExtensionType12d|constructor#(n);
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = invalid-type */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = invalid-type */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType13a|constructor#(core::int i) → self::ExtensionType13a /* = core::int */ {
|
||||
lowered final self::ExtensionType13a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
|
|
@ -40,15 +40,15 @@ extension type ExtensionType10b(int i) implements ExtensionTypeJ, ExtensionTypeK
|
|||
int get method4 => 42;
|
||||
void set method4(int value) {}
|
||||
}
|
||||
extension type ExtensionType11(Never n) {
|
||||
extension type ExtensionType11(Null n) {
|
||||
int get property => 42;
|
||||
void set property(String value) {}
|
||||
}
|
||||
extension type ExtensionType12a(Never n) implements ClassL, ClassM {}
|
||||
extension type ExtensionType12b(Never n) implements ClassL {
|
||||
extension type ExtensionType12b(ClassL n) implements ClassL {
|
||||
void set property(bool value) {}
|
||||
}
|
||||
extension type ExtensionType12c(Never n) implements ClassM {
|
||||
extension type ExtensionType12c(ClassM n) implements ClassM {
|
||||
bool get property => true;
|
||||
}
|
||||
extension type ExtensionType12d(Never n) implements ClassL, ClassM {
|
||||
|
|
|
@ -4,15 +4,15 @@ extension type ExtensionType10b(int i) implements ExtensionTypeJ, ExtensionTypeK
|
|||
int get method4 => 42;
|
||||
void set method4(int value) {}
|
||||
}
|
||||
extension type ExtensionType11(Never n) {
|
||||
extension type ExtensionType11(Null n) {
|
||||
int get property => 42;
|
||||
void set property(String value) {}
|
||||
}
|
||||
extension type ExtensionType12a(Never n) implements ClassL, ClassM {}
|
||||
extension type ExtensionType12b(Never n) implements ClassL {
|
||||
extension type ExtensionType12b(ClassL n) implements ClassL {
|
||||
void set property(bool value) {}
|
||||
}
|
||||
extension type ExtensionType12c(Never n) implements ClassM {
|
||||
extension type ExtensionType12c(ClassM n) implements ClassM {
|
||||
bool get property => true;
|
||||
}
|
||||
extension type ExtensionType12d(Never n) implements ClassL, ClassM {
|
||||
|
|
|
@ -10,6 +10,22 @@ library;
|
|||
// void method4() {} /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:73:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9b(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:94:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:107:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12d(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member.
|
||||
// Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict.
|
||||
// extension type ExtensionType1a(ClassA c) /* Error */
|
||||
|
@ -217,12 +233,12 @@ extension type ExtensionType9(core::int i) {
|
|||
constructor • = self::ExtensionType9|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9a(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9a(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType9a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9b(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9b(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get method4 = self::ExtensionType9b|get#method4;
|
||||
set method4 = self::ExtensionType9b|set#method4;
|
||||
|
@ -241,31 +257,31 @@ extension type ExtensionType10b(core::int i) implements imp::ExtensionTypeJ /* =
|
|||
constructor • = self::ExtensionType10b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType10b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType11(Never n) {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType11(Null n) {
|
||||
abstract inline-class-member representation-field get n() → Null;
|
||||
get property = self::ExtensionType11|get#property;
|
||||
set property = self::ExtensionType11|set#property;
|
||||
constructor • = self::ExtensionType11|constructor#;
|
||||
constructor tearoff • = self::ExtensionType11|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12a(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12a(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType12a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12b(Never n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12b(imp::ClassL n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassL;
|
||||
set property = self::ExtensionType12b|set#property;
|
||||
constructor • = self::ExtensionType12b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12c(Never n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12c(imp::ClassM n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassM;
|
||||
get property = self::ExtensionType12c|get#property;
|
||||
constructor • = self::ExtensionType12c|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12c|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12d(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12d(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get property = self::ExtensionType12d|get#property;
|
||||
set property = self::ExtensionType12d|set#property;
|
||||
|
@ -414,21 +430,21 @@ static inline-class-member method ExtensionType9|method4(lowered final self::Ext
|
|||
static inline-class-member method ExtensionType9|get#method4(lowered final self::ExtensionType9 /* = core::int */ #this) → () → void
|
||||
return () → void => self::ExtensionType9|method4(#this);
|
||||
static inline-class-member method ExtensionType9|set#method4(lowered final self::ExtensionType9 /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = Never */ {
|
||||
lowered final self::ExtensionType9a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = Never */
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = invalid-type */
|
||||
return self::ExtensionType9a|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = Never */ {
|
||||
lowered final self::ExtensionType9b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9b /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = Never */
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = invalid-type */
|
||||
return self::ExtensionType9b|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = Never */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType10a|constructor#(core::int i) → self::ExtensionType10a /* = core::int */ {
|
||||
lowered final self::ExtensionType10a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
@ -444,45 +460,45 @@ static inline-class-member method ExtensionType10b|constructor#(core::int i) →
|
|||
static inline-class-member method ExtensionType10b|get#method4(lowered final self::ExtensionType10b /* = core::int */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType10b|set#method4(lowered final self::ExtensionType10b /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType11|constructor#(Never n) → self::ExtensionType11 /* = Never */ {
|
||||
lowered final self::ExtensionType11 /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|constructor#(Null n) → self::ExtensionType11 /* = Null */ {
|
||||
lowered final self::ExtensionType11 /* = Null */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Never n) → self::ExtensionType11 /* = Never */
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Null n) → self::ExtensionType11 /* = Null */
|
||||
return self::ExtensionType11|constructor#(n);
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Null */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Never */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = Never */ {
|
||||
lowered final self::ExtensionType12a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Null */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = Never */
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = invalid-type */
|
||||
return self::ExtensionType12a|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|constructor#(Never n) → self::ExtensionType12b /* = Never */ {
|
||||
lowered final self::ExtensionType12b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|constructor#(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */ {
|
||||
lowered final self::ExtensionType12b /* = imp::ClassL */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(Never n) → self::ExtensionType12b /* = Never */
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */
|
||||
return self::ExtensionType12b|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(Never n) → self::ExtensionType12c /* = Never */ {
|
||||
lowered final self::ExtensionType12c /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = imp::ClassL */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */ {
|
||||
lowered final self::ExtensionType12c /* = imp::ClassM */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(Never n) → self::ExtensionType12c /* = Never */
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */
|
||||
return self::ExtensionType12c|constructor#(n);
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = imp::ClassM */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = Never */ {
|
||||
lowered final self::ExtensionType12d /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12d /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = Never */
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = invalid-type */
|
||||
return self::ExtensionType12d|constructor#(n);
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = invalid-type */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = invalid-type */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType13a|constructor#(core::int i) → self::ExtensionType13a /* = core::int */ {
|
||||
lowered final self::ExtensionType13a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
|
|
@ -10,6 +10,22 @@ library;
|
|||
// void method4() {} /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:73:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9b(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:94:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:107:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12d(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member.
|
||||
// Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict.
|
||||
// extension type ExtensionType1a(ClassA c) /* Error */
|
||||
|
@ -217,12 +233,12 @@ extension type ExtensionType9(core::int i) {
|
|||
constructor • = self::ExtensionType9|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9a(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9a(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType9a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9b(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9b(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get method4 = self::ExtensionType9b|get#method4;
|
||||
set method4 = self::ExtensionType9b|set#method4;
|
||||
|
@ -241,31 +257,31 @@ extension type ExtensionType10b(core::int i) implements imp::ExtensionTypeJ /* =
|
|||
constructor • = self::ExtensionType10b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType10b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType11(Never n) {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType11(Null n) {
|
||||
abstract inline-class-member representation-field get n() → Null;
|
||||
get property = self::ExtensionType11|get#property;
|
||||
set property = self::ExtensionType11|set#property;
|
||||
constructor • = self::ExtensionType11|constructor#;
|
||||
constructor tearoff • = self::ExtensionType11|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12a(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12a(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType12a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12b(Never n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12b(imp::ClassL n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassL;
|
||||
set property = self::ExtensionType12b|set#property;
|
||||
constructor • = self::ExtensionType12b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12c(Never n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12c(imp::ClassM n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassM;
|
||||
get property = self::ExtensionType12c|get#property;
|
||||
constructor • = self::ExtensionType12c|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12c|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12d(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12d(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get property = self::ExtensionType12d|get#property;
|
||||
set property = self::ExtensionType12d|set#property;
|
||||
|
@ -414,21 +430,21 @@ static inline-class-member method ExtensionType9|method4(lowered final self::Ext
|
|||
static inline-class-member method ExtensionType9|get#method4(lowered final self::ExtensionType9 /* = core::int */ #this) → () → void
|
||||
return () → void => self::ExtensionType9|method4(#this);
|
||||
static inline-class-member method ExtensionType9|set#method4(lowered final self::ExtensionType9 /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = Never */ {
|
||||
lowered final self::ExtensionType9a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = Never */
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = invalid-type */
|
||||
return self::ExtensionType9a|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = Never */ {
|
||||
lowered final self::ExtensionType9b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9b /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = Never */
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = invalid-type */
|
||||
return self::ExtensionType9b|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = Never */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType10a|constructor#(core::int i) → self::ExtensionType10a /* = core::int */ {
|
||||
lowered final self::ExtensionType10a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
@ -444,45 +460,45 @@ static inline-class-member method ExtensionType10b|constructor#(core::int i) →
|
|||
static inline-class-member method ExtensionType10b|get#method4(lowered final self::ExtensionType10b /* = core::int */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType10b|set#method4(lowered final self::ExtensionType10b /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType11|constructor#(Never n) → self::ExtensionType11 /* = Never */ {
|
||||
lowered final self::ExtensionType11 /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|constructor#(Null n) → self::ExtensionType11 /* = Null */ {
|
||||
lowered final self::ExtensionType11 /* = Null */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Never n) → self::ExtensionType11 /* = Never */
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Null n) → self::ExtensionType11 /* = Null */
|
||||
return self::ExtensionType11|constructor#(n);
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Null */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Never */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = Never */ {
|
||||
lowered final self::ExtensionType12a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Null */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = Never */
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = invalid-type */
|
||||
return self::ExtensionType12a|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|constructor#(Never n) → self::ExtensionType12b /* = Never */ {
|
||||
lowered final self::ExtensionType12b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|constructor#(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */ {
|
||||
lowered final self::ExtensionType12b /* = imp::ClassL */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(Never n) → self::ExtensionType12b /* = Never */
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */
|
||||
return self::ExtensionType12b|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(Never n) → self::ExtensionType12c /* = Never */ {
|
||||
lowered final self::ExtensionType12c /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = imp::ClassL */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */ {
|
||||
lowered final self::ExtensionType12c /* = imp::ClassM */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(Never n) → self::ExtensionType12c /* = Never */
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */
|
||||
return self::ExtensionType12c|constructor#(n);
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = imp::ClassM */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = Never */ {
|
||||
lowered final self::ExtensionType12d /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12d /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = Never */
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = invalid-type */
|
||||
return self::ExtensionType12d|constructor#(n);
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = invalid-type */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = invalid-type */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType13a|constructor#(core::int i) → self::ExtensionType13a /* = core::int */ {
|
||||
lowered final self::ExtensionType13a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
|
|
@ -10,6 +10,22 @@ library;
|
|||
// void method4() {} /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:73:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9b(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:94:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:107:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12d(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member.
|
||||
// Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict.
|
||||
// extension type ExtensionType1a(ClassA c) /* Error */
|
||||
|
@ -217,12 +233,12 @@ extension type ExtensionType9(core::int i) {
|
|||
constructor • = self::ExtensionType9|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9a(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9a(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType9a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9b(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9b(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get method4 = self::ExtensionType9b|get#method4;
|
||||
set method4 = self::ExtensionType9b|set#method4;
|
||||
|
@ -241,31 +257,31 @@ extension type ExtensionType10b(core::int i) implements imp::ExtensionTypeJ /* =
|
|||
constructor • = self::ExtensionType10b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType10b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType11(Never n) {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType11(Null n) {
|
||||
abstract inline-class-member representation-field get n() → Null;
|
||||
get property = self::ExtensionType11|get#property;
|
||||
set property = self::ExtensionType11|set#property;
|
||||
constructor • = self::ExtensionType11|constructor#;
|
||||
constructor tearoff • = self::ExtensionType11|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12a(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12a(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType12a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12b(Never n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12b(imp::ClassL n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassL;
|
||||
set property = self::ExtensionType12b|set#property;
|
||||
constructor • = self::ExtensionType12b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12c(Never n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12c(imp::ClassM n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassM;
|
||||
get property = self::ExtensionType12c|get#property;
|
||||
constructor • = self::ExtensionType12c|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12c|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12d(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12d(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get property = self::ExtensionType12d|get#property;
|
||||
set property = self::ExtensionType12d|set#property;
|
||||
|
@ -390,17 +406,17 @@ static inline-class-member method ExtensionType9|get#method4(lowered final self:
|
|||
return () → void => self::ExtensionType9|method4(#this);
|
||||
static inline-class-member method ExtensionType9|set#method4(lowered final self::ExtensionType9 /* = core::int */ #this, core::int value) → void
|
||||
;
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = Never */
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = invalid-type */
|
||||
;
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = Never */
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = invalid-type */
|
||||
return self::ExtensionType9a|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = Never */
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = invalid-type */
|
||||
;
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = Never */
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = invalid-type */
|
||||
return self::ExtensionType9b|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this) → core::int
|
||||
;
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = Never */ #this, core::int value) → void
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this, core::int value) → void
|
||||
;
|
||||
static inline-class-member method ExtensionType10a|constructor#(core::int i) → self::ExtensionType10a /* = core::int */
|
||||
;
|
||||
|
@ -414,37 +430,37 @@ static inline-class-member method ExtensionType10b|get#method4(lowered final sel
|
|||
;
|
||||
static inline-class-member method ExtensionType10b|set#method4(lowered final self::ExtensionType10b /* = core::int */ #this, core::int value) → void
|
||||
;
|
||||
static inline-class-member method ExtensionType11|constructor#(Never n) → self::ExtensionType11 /* = Never */
|
||||
static inline-class-member method ExtensionType11|constructor#(Null n) → self::ExtensionType11 /* = Null */
|
||||
;
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Never n) → self::ExtensionType11 /* = Never */
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Null n) → self::ExtensionType11 /* = Null */
|
||||
return self::ExtensionType11|constructor#(n);
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Null */ #this) → core::int
|
||||
;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Never */ #this, core::String value) → void
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Null */ #this, core::String value) → void
|
||||
;
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = Never */
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = invalid-type */
|
||||
;
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = Never */
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = invalid-type */
|
||||
return self::ExtensionType12a|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|constructor#(Never n) → self::ExtensionType12b /* = Never */
|
||||
static inline-class-member method ExtensionType12b|constructor#(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */
|
||||
;
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(Never n) → self::ExtensionType12b /* = Never */
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */
|
||||
return self::ExtensionType12b|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = Never */ #this, core::bool value) → void
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = imp::ClassL */ #this, core::bool value) → void
|
||||
;
|
||||
static inline-class-member method ExtensionType12c|constructor#(Never n) → self::ExtensionType12c /* = Never */
|
||||
static inline-class-member method ExtensionType12c|constructor#(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */
|
||||
;
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(Never n) → self::ExtensionType12c /* = Never */
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */
|
||||
return self::ExtensionType12c|constructor#(n);
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = imp::ClassM */ #this) → core::bool
|
||||
;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = Never */
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = invalid-type */
|
||||
;
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = Never */
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = invalid-type */
|
||||
return self::ExtensionType12d|constructor#(n);
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = invalid-type */ #this) → core::bool
|
||||
;
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = Never */ #this, core::bool value) → void
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = invalid-type */ #this, core::bool value) → void
|
||||
;
|
||||
static inline-class-member method ExtensionType13a|constructor#(core::int i) → self::ExtensionType13a /* = core::int */
|
||||
;
|
||||
|
|
|
@ -10,6 +10,22 @@ library;
|
|||
// void method4() {} /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:73:38: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType9b(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:94:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12a(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:107:39: Error: The representation type can't be a bottom type.
|
||||
// extension type ExtensionType12d(Never n) /* Error */
|
||||
// ^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member.
|
||||
// Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict.
|
||||
// extension type ExtensionType1a(ClassA c) /* Error */
|
||||
|
@ -217,12 +233,12 @@ extension type ExtensionType9(core::int i) {
|
|||
constructor • = self::ExtensionType9|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9a(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9a(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType9a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType9a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType9b(Never n) implements imp::ClassJ, imp::ClassK {
|
||||
extension type ExtensionType9b(invalid-type n) implements imp::ClassJ, imp::ClassK {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get method4 = self::ExtensionType9b|get#method4;
|
||||
set method4 = self::ExtensionType9b|set#method4;
|
||||
|
@ -241,31 +257,31 @@ extension type ExtensionType10b(core::int i) implements imp::ExtensionTypeJ /* =
|
|||
constructor • = self::ExtensionType10b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType10b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType11(Never n) {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType11(Null n) {
|
||||
abstract inline-class-member representation-field get n() → Null;
|
||||
get property = self::ExtensionType11|get#property;
|
||||
set property = self::ExtensionType11|set#property;
|
||||
constructor • = self::ExtensionType11|constructor#;
|
||||
constructor tearoff • = self::ExtensionType11|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12a(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12a(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
constructor • = self::ExtensionType12a|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12a|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12b(Never n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12b(imp::ClassL n) implements imp::ClassL {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassL;
|
||||
set property = self::ExtensionType12b|set#property;
|
||||
constructor • = self::ExtensionType12b|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12b|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12c(Never n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
extension type ExtensionType12c(imp::ClassM n) implements imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → imp::ClassM;
|
||||
get property = self::ExtensionType12c|get#property;
|
||||
constructor • = self::ExtensionType12c|constructor#;
|
||||
constructor tearoff • = self::ExtensionType12c|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type ExtensionType12d(Never n) implements imp::ClassL, imp::ClassM {
|
||||
extension type ExtensionType12d(invalid-type n) implements imp::ClassL, imp::ClassM {
|
||||
abstract inline-class-member representation-field get n() → Never;
|
||||
get property = self::ExtensionType12d|get#property;
|
||||
set property = self::ExtensionType12d|set#property;
|
||||
|
@ -414,21 +430,21 @@ static inline-class-member method ExtensionType9|method4(lowered final self::Ext
|
|||
static inline-class-member method ExtensionType9|get#method4(lowered final self::ExtensionType9 /* = core::int */ #this) → () → void
|
||||
return () → void => self::ExtensionType9|method4(#this);
|
||||
static inline-class-member method ExtensionType9|set#method4(lowered final self::ExtensionType9 /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = Never */ {
|
||||
lowered final self::ExtensionType9a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9a|constructor#(Never n) → self::ExtensionType9a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = Never */
|
||||
static inline-class-member method ExtensionType9a|constructor#_#new#tearOff(Never n) → self::ExtensionType9a /* = invalid-type */
|
||||
return self::ExtensionType9a|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = Never */ {
|
||||
lowered final self::ExtensionType9b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType9b|constructor#(Never n) → self::ExtensionType9b /* = invalid-type */ {
|
||||
lowered final self::ExtensionType9b /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = Never */
|
||||
static inline-class-member method ExtensionType9b|constructor#_#new#tearOff(Never n) → self::ExtensionType9b /* = invalid-type */
|
||||
return self::ExtensionType9b|constructor#(n);
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType9b|get#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = Never */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType9b|set#method4(lowered final self::ExtensionType9b /* = invalid-type */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType10a|constructor#(core::int i) → self::ExtensionType10a /* = core::int */ {
|
||||
lowered final self::ExtensionType10a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
@ -444,45 +460,45 @@ static inline-class-member method ExtensionType10b|constructor#(core::int i) →
|
|||
static inline-class-member method ExtensionType10b|get#method4(lowered final self::ExtensionType10b /* = core::int */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType10b|set#method4(lowered final self::ExtensionType10b /* = core::int */ #this, core::int value) → void {}
|
||||
static inline-class-member method ExtensionType11|constructor#(Never n) → self::ExtensionType11 /* = Never */ {
|
||||
lowered final self::ExtensionType11 /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|constructor#(Null n) → self::ExtensionType11 /* = Null */ {
|
||||
lowered final self::ExtensionType11 /* = Null */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Never n) → self::ExtensionType11 /* = Never */
|
||||
static inline-class-member method ExtensionType11|constructor#_#new#tearOff(Null n) → self::ExtensionType11 /* = Null */
|
||||
return self::ExtensionType11|constructor#(n);
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Never */ #this) → core::int
|
||||
static inline-class-member method ExtensionType11|get#property(lowered final self::ExtensionType11 /* = Null */ #this) → core::int
|
||||
return 42;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Never */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = Never */ {
|
||||
lowered final self::ExtensionType12a /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType11|set#property(lowered final self::ExtensionType11 /* = Null */ #this, core::String value) → void {}
|
||||
static inline-class-member method ExtensionType12a|constructor#(Never n) → self::ExtensionType12a /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12a /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = Never */
|
||||
static inline-class-member method ExtensionType12a|constructor#_#new#tearOff(Never n) → self::ExtensionType12a /* = invalid-type */
|
||||
return self::ExtensionType12a|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|constructor#(Never n) → self::ExtensionType12b /* = Never */ {
|
||||
lowered final self::ExtensionType12b /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|constructor#(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */ {
|
||||
lowered final self::ExtensionType12b /* = imp::ClassL */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(Never n) → self::ExtensionType12b /* = Never */
|
||||
static inline-class-member method ExtensionType12b|constructor#_#new#tearOff(imp::ClassL n) → self::ExtensionType12b /* = imp::ClassL */
|
||||
return self::ExtensionType12b|constructor#(n);
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(Never n) → self::ExtensionType12c /* = Never */ {
|
||||
lowered final self::ExtensionType12c /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12b|set#property(lowered final self::ExtensionType12b /* = imp::ClassL */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12c|constructor#(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */ {
|
||||
lowered final self::ExtensionType12c /* = imp::ClassM */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(Never n) → self::ExtensionType12c /* = Never */
|
||||
static inline-class-member method ExtensionType12c|constructor#_#new#tearOff(imp::ClassM n) → self::ExtensionType12c /* = imp::ClassM */
|
||||
return self::ExtensionType12c|constructor#(n);
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12c|get#property(lowered final self::ExtensionType12c /* = imp::ClassM */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = Never */ {
|
||||
lowered final self::ExtensionType12d /* = Never */ #this = n;
|
||||
static inline-class-member method ExtensionType12d|constructor#(Never n) → self::ExtensionType12d /* = invalid-type */ {
|
||||
lowered final self::ExtensionType12d /* = invalid-type */ #this = n;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = Never */
|
||||
static inline-class-member method ExtensionType12d|constructor#_#new#tearOff(Never n) → self::ExtensionType12d /* = invalid-type */
|
||||
return self::ExtensionType12d|constructor#(n);
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = Never */ #this) → core::bool
|
||||
static inline-class-member method ExtensionType12d|get#property(lowered final self::ExtensionType12d /* = invalid-type */ #this) → core::bool
|
||||
return true;
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = Never */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType12d|set#property(lowered final self::ExtensionType12d /* = invalid-type */ #this, core::bool value) → void {}
|
||||
static inline-class-member method ExtensionType13a|constructor#(core::int i) → self::ExtensionType13a /* = core::int */ {
|
||||
lowered final self::ExtensionType13a /* = core::int */ #this = i;
|
||||
return #this;
|
||||
|
|
7
pkg/front_end/testcases/extension_types/issue53824.dart
Normal file
7
pkg/front_end/testcases/extension_types/issue53824.dart
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
extension type E1(Never foo) {} // Error.
|
||||
extension type E2<X extends Never>(X foo) {} // Error.
|
||||
extension type E3<X extends Y, Y extends Never>(X foo) {} // Error.
|
|
@ -0,0 +1,51 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:5:25: Error: The representation type can't be a bottom type.
|
||||
// extension type E1(Never foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:6:38: Error: The representation type can't be a bottom type.
|
||||
// extension type E2<X extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:7:51: Error: The representation type can't be a bottom type.
|
||||
// extension type E3<X extends Y, Y extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → Never;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2<X extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E3<X extends Y = Never, Y extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(Never foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E1|constructor#_#new#tearOff(Never foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static inline-class-member method E2|constructor#<X extends Never>(self::E2|constructor#::X foo) → self::E2<self::E2|constructor#::X> /* = invalid-type */ {
|
||||
lowered final self::E2<self::E2|constructor#::X> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E2|constructor#_#new#tearOff<X extends Never>(self::E2|constructor#_#new#tearOff::X foo) → self::E2<self::E2|constructor#_#new#tearOff::X>% /* = invalid-type */
|
||||
return self::E2|constructor#<self::E2|constructor#_#new#tearOff::X>(foo);
|
||||
static inline-class-member method E3|constructor#<X extends self::E3|constructor#::Y = Never, Y extends Never>(self::E3|constructor#::X foo) → self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ {
|
||||
lowered final self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E3|constructor#_#new#tearOff<X extends self::E3|constructor#_#new#tearOff::Y = Never, Y extends Never>(self::E3|constructor#_#new#tearOff::X foo) → self::E3<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>% /* = invalid-type */
|
||||
return self::E3|constructor#<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>(foo);
|
|
@ -0,0 +1,51 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:5:25: Error: The representation type can't be a bottom type.
|
||||
// extension type E1(Never foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:6:38: Error: The representation type can't be a bottom type.
|
||||
// extension type E2<X extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:7:51: Error: The representation type can't be a bottom type.
|
||||
// extension type E3<X extends Y, Y extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → Never;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2<X extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E3<X extends Y = Never, Y extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(Never foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E1|constructor#_#new#tearOff(Never foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static inline-class-member method E2|constructor#<X extends Never>(self::E2|constructor#::X foo) → self::E2<self::E2|constructor#::X> /* = invalid-type */ {
|
||||
lowered final self::E2<self::E2|constructor#::X> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E2|constructor#_#new#tearOff<X extends Never>(self::E2|constructor#_#new#tearOff::X foo) → self::E2<self::E2|constructor#_#new#tearOff::X>% /* = invalid-type */
|
||||
return self::E2|constructor#<self::E2|constructor#_#new#tearOff::X>(foo);
|
||||
static inline-class-member method E3|constructor#<X extends self::E3|constructor#::Y = Never, Y extends Never>(self::E3|constructor#::X foo) → self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ {
|
||||
lowered final self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E3|constructor#_#new#tearOff<X extends self::E3|constructor#_#new#tearOff::Y = Never, Y extends Never>(self::E3|constructor#_#new#tearOff::X foo) → self::E3<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>% /* = invalid-type */
|
||||
return self::E3|constructor#<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>(foo);
|
|
@ -0,0 +1,3 @@
|
|||
extension type E1(Never foo) {}
|
||||
extension type E2<X extends Never>(X foo) {}
|
||||
extension type E3<X extends Y, Y extends Never>(X foo) {}
|
|
@ -0,0 +1,3 @@
|
|||
extension type E1(Never foo) {}
|
||||
extension type E2<X extends Never>(X foo) {}
|
||||
extension type E3<X extends Y, Y extends Never>(X foo) {}
|
|
@ -0,0 +1,51 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:5:25: Error: The representation type can't be a bottom type.
|
||||
// extension type E1(Never foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:6:38: Error: The representation type can't be a bottom type.
|
||||
// extension type E2<X extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:7:51: Error: The representation type can't be a bottom type.
|
||||
// extension type E3<X extends Y, Y extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → Never;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2<X extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E3<X extends Y = Never, Y extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(Never foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E1|constructor#_#new#tearOff(Never foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static inline-class-member method E2|constructor#<X extends Never>(self::E2|constructor#::X foo) → self::E2<self::E2|constructor#::X> /* = invalid-type */ {
|
||||
lowered final self::E2<self::E2|constructor#::X> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E2|constructor#_#new#tearOff<X extends Never>(self::E2|constructor#_#new#tearOff::X foo) → self::E2<self::E2|constructor#_#new#tearOff::X>% /* = invalid-type */
|
||||
return self::E2|constructor#<self::E2|constructor#_#new#tearOff::X>(foo);
|
||||
static inline-class-member method E3|constructor#<X extends self::E3|constructor#::Y = Never, Y extends Never>(self::E3|constructor#::X foo) → self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ {
|
||||
lowered final self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E3|constructor#_#new#tearOff<X extends self::E3|constructor#_#new#tearOff::Y = Never, Y extends Never>(self::E3|constructor#_#new#tearOff::X foo) → self::E3<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>% /* = invalid-type */
|
||||
return self::E3|constructor#<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>(foo);
|
|
@ -0,0 +1,51 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:5:25: Error: The representation type can't be a bottom type.
|
||||
// extension type E1(Never foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:6:38: Error: The representation type can't be a bottom type.
|
||||
// extension type E2<X extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:7:51: Error: The representation type can't be a bottom type.
|
||||
// extension type E3<X extends Y, Y extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → Never;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2<X extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E3<X extends Y = Never, Y extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(Never foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E1|constructor#_#new#tearOff(Never foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static inline-class-member method E2|constructor#<X extends Never>(self::E2|constructor#::X foo) → self::E2<self::E2|constructor#::X> /* = invalid-type */ {
|
||||
lowered final self::E2<self::E2|constructor#::X> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E2|constructor#_#new#tearOff<X extends Never>(self::E2|constructor#_#new#tearOff::X foo) → self::E2<self::E2|constructor#_#new#tearOff::X>% /* = invalid-type */
|
||||
return self::E2|constructor#<self::E2|constructor#_#new#tearOff::X>(foo);
|
||||
static inline-class-member method E3|constructor#<X extends self::E3|constructor#::Y = Never, Y extends Never>(self::E3|constructor#::X foo) → self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ {
|
||||
lowered final self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E3|constructor#_#new#tearOff<X extends self::E3|constructor#_#new#tearOff::Y = Never, Y extends Never>(self::E3|constructor#_#new#tearOff::X foo) → self::E3<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>% /* = invalid-type */
|
||||
return self::E3|constructor#<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>(foo);
|
|
@ -0,0 +1,45 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:5:25: Error: The representation type can't be a bottom type.
|
||||
// extension type E1(Never foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:6:38: Error: The representation type can't be a bottom type.
|
||||
// extension type E2<X extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:7:51: Error: The representation type can't be a bottom type.
|
||||
// extension type E3<X extends Y, Y extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → Never;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2<X extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E3<X extends Y = Never, Y extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(Never foo) → self::E1 /* = invalid-type */
|
||||
;
|
||||
static inline-class-member method E1|constructor#_#new#tearOff(Never foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static inline-class-member method E2|constructor#<X extends Never>(self::E2|constructor#::X foo) → self::E2<self::E2|constructor#::X> /* = invalid-type */
|
||||
;
|
||||
static inline-class-member method E2|constructor#_#new#tearOff<X extends Never>(self::E2|constructor#_#new#tearOff::X foo) → self::E2<self::E2|constructor#_#new#tearOff::X>% /* = invalid-type */
|
||||
return self::E2|constructor#<self::E2|constructor#_#new#tearOff::X>(foo);
|
||||
static inline-class-member method E3|constructor#<X extends self::E3|constructor#::Y = Never, Y extends Never>(self::E3|constructor#::X foo) → self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */
|
||||
;
|
||||
static inline-class-member method E3|constructor#_#new#tearOff<X extends self::E3|constructor#_#new#tearOff::Y = Never, Y extends Never>(self::E3|constructor#_#new#tearOff::X foo) → self::E3<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>% /* = invalid-type */
|
||||
return self::E3|constructor#<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>(foo);
|
|
@ -0,0 +1,51 @@
|
|||
library;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:5:25: Error: The representation type can't be a bottom type.
|
||||
// extension type E1(Never foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:6:38: Error: The representation type can't be a bottom type.
|
||||
// extension type E2<X extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
// pkg/front_end/testcases/extension_types/issue53824.dart:7:51: Error: The representation type can't be a bottom type.
|
||||
// extension type E3<X extends Y, Y extends Never>(X foo) {} // Error.
|
||||
// ^^^
|
||||
//
|
||||
import self as self;
|
||||
|
||||
extension type E1(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → Never;
|
||||
constructor • = self::E1|constructor#;
|
||||
constructor tearoff • = self::E1|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E2<X extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E2|constructor#;
|
||||
constructor tearoff • = self::E2|constructor#_#new#tearOff;
|
||||
}
|
||||
extension type E3<X extends Y = Never, Y extends Never>(invalid-type foo) {
|
||||
abstract inline-class-member representation-field get foo() → X;
|
||||
constructor • = self::E3|constructor#;
|
||||
constructor tearoff • = self::E3|constructor#_#new#tearOff;
|
||||
}
|
||||
static inline-class-member method E1|constructor#(Never foo) → self::E1 /* = invalid-type */ {
|
||||
lowered final self::E1 /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E1|constructor#_#new#tearOff(Never foo) → self::E1 /* = invalid-type */
|
||||
return self::E1|constructor#(foo);
|
||||
static inline-class-member method E2|constructor#<X extends Never>(self::E2|constructor#::X foo) → self::E2<self::E2|constructor#::X> /* = invalid-type */ {
|
||||
lowered final self::E2<self::E2|constructor#::X> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E2|constructor#_#new#tearOff<X extends Never>(self::E2|constructor#_#new#tearOff::X foo) → self::E2<self::E2|constructor#_#new#tearOff::X>% /* = invalid-type */
|
||||
return self::E2|constructor#<self::E2|constructor#_#new#tearOff::X>(foo);
|
||||
static inline-class-member method E3|constructor#<X extends self::E3|constructor#::Y = Never, Y extends Never>(self::E3|constructor#::X foo) → self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ {
|
||||
lowered final self::E3<self::E3|constructor#::X, self::E3|constructor#::Y> /* = invalid-type */ #this = foo;
|
||||
return #this;
|
||||
}
|
||||
static inline-class-member method E3|constructor#_#new#tearOff<X extends self::E3|constructor#_#new#tearOff::Y = Never, Y extends Never>(self::E3|constructor#_#new#tearOff::X foo) → self::E3<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>% /* = invalid-type */
|
||||
return self::E3|constructor#<self::E3|constructor#_#new#tearOff::X, self::E3|constructor#_#new#tearOff::Y>(foo);
|
|
@ -6,7 +6,7 @@ library kernel.core_types;
|
|||
|
||||
import 'ast.dart';
|
||||
import 'library_index.dart';
|
||||
import 'type_algebra.dart';
|
||||
import 'type_algebra.dart' as type_algebra;
|
||||
|
||||
/// Provides access to the classes and libraries in the core libraries.
|
||||
class CoreTypes {
|
||||
|
@ -1160,7 +1160,8 @@ class CoreTypes {
|
|||
// TOP(T*) is true iff TOP(T) or OBJECT(T).
|
||||
if (type.declaredNullability == Nullability.nullable ||
|
||||
type.declaredNullability == Nullability.legacy) {
|
||||
DartType nonNullableType = unwrapNullabilityConstructor(type, this);
|
||||
DartType nonNullableType =
|
||||
type_algebra.unwrapNullabilityConstructor(type);
|
||||
if (!identical(type, nonNullableType)) {
|
||||
return isTop(nonNullableType) || isObject(nonNullableType);
|
||||
}
|
||||
|
@ -1202,29 +1203,7 @@ class CoreTypes {
|
|||
/// https://github.com/dart-lang/language/blob/master/resources/type-system/upper-lower-bounds.md#helper-predicates
|
||||
@pragma("vm:prefer-inline")
|
||||
bool isBottom(DartType type) {
|
||||
if (type is InterfaceType) return false;
|
||||
return _isBottom(type);
|
||||
}
|
||||
|
||||
bool _isBottom(DartType type) {
|
||||
if (type is InvalidType) return false;
|
||||
|
||||
// BOTTOM(Never) is true.
|
||||
if (type is NeverType && type.nullability == Nullability.nonNullable) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// BOTTOM(X&T) is true iff BOTTOM(T).
|
||||
if (type is IntersectionType && type.isPotentiallyNonNullable) {
|
||||
return isBottom(type.right);
|
||||
}
|
||||
|
||||
// BOTTOM(X extends T) is true iff BOTTOM(T).
|
||||
if (type is TypeParameterType && type.isPotentiallyNonNullable) {
|
||||
return isBottom(type.parameter.bound);
|
||||
}
|
||||
|
||||
return false;
|
||||
return type_algebra.isBottom(type);
|
||||
}
|
||||
|
||||
/// Checks if [type] satisfies the NULL predicate.
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
library kernel.type_algebra;
|
||||
|
||||
import 'ast.dart';
|
||||
import 'core_types.dart';
|
||||
import 'src/find_type_visitor.dart';
|
||||
import 'src/replacement_visitor.dart';
|
||||
|
||||
|
@ -1884,8 +1883,8 @@ class _PrimitiveTypeVerifier implements DartTypeVisitor<bool> {
|
|||
/// Some types are nullable even without the application of the nullable type
|
||||
/// constructor at the top level, for example, Null or FutureOr<int?>.
|
||||
// TODO(cstefantsova): Remove [coreTypes] parameter when NullType is landed.
|
||||
DartType unwrapNullabilityConstructor(DartType type, CoreTypes coreTypes) {
|
||||
return type.accept1(const _NullabilityConstructorUnwrapper(), coreTypes);
|
||||
DartType unwrapNullabilityConstructor(DartType type) {
|
||||
return type.accept(const _NullabilityConstructorUnwrapper());
|
||||
}
|
||||
|
||||
/// Implementation of [unwrapNullabilityConstructor] as a visitor.
|
||||
|
@ -1894,81 +1893,79 @@ DartType unwrapNullabilityConstructor(DartType type, CoreTypes coreTypes) {
|
|||
/// new implementation of [DartType] visible at compile time.
|
||||
// TODO(cstefantsova): Remove CoreTypes as the second argument when NullType is
|
||||
// landed.
|
||||
class _NullabilityConstructorUnwrapper
|
||||
implements DartTypeVisitor1<DartType, CoreTypes> {
|
||||
class _NullabilityConstructorUnwrapper implements DartTypeVisitor<DartType> {
|
||||
const _NullabilityConstructorUnwrapper();
|
||||
|
||||
@override
|
||||
DartType visitAuxiliaryType(AuxiliaryType node, CoreTypes coreTypes) {
|
||||
DartType visitAuxiliaryType(AuxiliaryType node) {
|
||||
throw new UnsupportedError(
|
||||
"Unsupported auxiliary type ${node} (${node.runtimeType}).");
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitDynamicType(DynamicType node, CoreTypes coreTypes) => node;
|
||||
DartType visitDynamicType(DynamicType node) => node;
|
||||
|
||||
@override
|
||||
DartType visitFunctionType(FunctionType node, CoreTypes coreTypes) {
|
||||
DartType visitFunctionType(FunctionType node) {
|
||||
return node.withDeclaredNullability(Nullability.nonNullable);
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitRecordType(RecordType node, CoreTypes coreTypes) {
|
||||
DartType visitRecordType(RecordType node) {
|
||||
return node.withDeclaredNullability(Nullability.nonNullable);
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitFutureOrType(FutureOrType node, CoreTypes coreTypes) {
|
||||
DartType visitFutureOrType(FutureOrType node) {
|
||||
return node.withDeclaredNullability(Nullability.nonNullable);
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitInterfaceType(InterfaceType node, CoreTypes coreTypes) {
|
||||
DartType visitInterfaceType(InterfaceType node) {
|
||||
return node.withDeclaredNullability(Nullability.nonNullable);
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitExtensionType(ExtensionType node, CoreTypes coreTypes) {
|
||||
DartType visitExtensionType(ExtensionType node) {
|
||||
return node.withDeclaredNullability(Nullability.nonNullable);
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitInvalidType(InvalidType node, CoreTypes coreTypes) => node;
|
||||
DartType visitInvalidType(InvalidType node) => node;
|
||||
|
||||
@override
|
||||
DartType visitNeverType(NeverType node, CoreTypes coreTypes) {
|
||||
DartType visitNeverType(NeverType node) {
|
||||
return node.withDeclaredNullability(Nullability.nonNullable);
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitNullType(NullType node, CoreTypes coreTypes) => node;
|
||||
DartType visitNullType(NullType node) => node;
|
||||
|
||||
@override
|
||||
DartType visitTypeParameterType(TypeParameterType node, CoreTypes coreTypes) {
|
||||
DartType visitTypeParameterType(TypeParameterType node) {
|
||||
return node.withDeclaredNullability(
|
||||
TypeParameterType.computeNullabilityFromBound(node.parameter));
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitStructuralParameterType(
|
||||
StructuralParameterType node, CoreTypes coreTypes) {
|
||||
DartType visitStructuralParameterType(StructuralParameterType node) {
|
||||
return node.withDeclaredNullability(
|
||||
StructuralParameterType.computeNullabilityFromBound(node.parameter));
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitIntersectionType(IntersectionType node, CoreTypes coreTypes) {
|
||||
DartType visitIntersectionType(IntersectionType node) {
|
||||
// Intersection types don't have their own nullabilities.
|
||||
return node;
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitTypedefType(TypedefType node, CoreTypes coreTypes) {
|
||||
DartType visitTypedefType(TypedefType node) {
|
||||
return node.withDeclaredNullability(Nullability.nonNullable);
|
||||
}
|
||||
|
||||
@override
|
||||
DartType visitVoidType(VoidType node, CoreTypes coreTypes) => node;
|
||||
DartType visitVoidType(VoidType node) => node;
|
||||
}
|
||||
|
||||
abstract class NullabilityAwareTypeVariableEliminatorBase
|
||||
|
@ -2413,3 +2410,32 @@ DartType _updateNestedFutureOrNullability(
|
|||
return typeToUpdate.withDeclaredNullability(updatedNullability);
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns true if [type] is a bottom type
|
||||
///
|
||||
/// Some examples of bottom types are `Never`, `X` where `X extends Never`, and
|
||||
/// `X & Never`.
|
||||
///
|
||||
/// For the definition of BOTTOM see the following:
|
||||
/// https://github.com/dart-lang/language/blob/master/resources/type-system/upper-lower-bounds.md#helper-predicates
|
||||
bool isBottom(DartType type) {
|
||||
if (type is InterfaceType) return false;
|
||||
if (type is InvalidType) return false;
|
||||
|
||||
// BOTTOM(Never) is true.
|
||||
if (type is NeverType && type.nullability == Nullability.nonNullable) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// BOTTOM(X&T) is true iff BOTTOM(T).
|
||||
if (type is IntersectionType && type.isPotentiallyNonNullable) {
|
||||
return isBottom(type.right);
|
||||
}
|
||||
|
||||
// BOTTOM(X extends T) is true iff BOTTOM(T).
|
||||
if (type is TypeParameterType && type.isPotentiallyNonNullable) {
|
||||
return isBottom(type.parameter.bound);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@ extension type V02(void _) {}
|
|||
extension type V03(Never _) {}
|
||||
// ^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.EXTENSION_TYPE_REPRESENTATION_TYPE_BOTTOM
|
||||
// ^
|
||||
// [cfe] The representation type can't be a bottom type.
|
||||
extension type V04(Null _) {}
|
||||
extension type V05(Function _) {}
|
||||
extension type V06(Record _) {}
|
||||
|
|
Loading…
Reference in a new issue