[cfe] Focus nullable subtype error messages

Now that the types in the message were recently adjusted to include the '?', I think it's beneficial to focus on what the underlying problem is rather than the syntax.

Change-Id: I7e59ea3cc2ce618fe46052a9c5e04a973a5f6ab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349581
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
This commit is contained in:
Parker Lougheed 2024-02-14 13:22:29 +00:00 committed by Commit Queue
parent 5d664b4bd4
commit d1553ffda6
26 changed files with 234 additions and 121 deletions

View file

@ -13604,8 +13604,8 @@ Message _withArgumentsNullSafetyOptOutImplicit(String string) {
const Template<Message Function(String name)> templateNullableInterfaceError =
const Template<Message Function(String name)>(
"NullableInterfaceError",
problemMessageTemplate:
r"""Can't implement '#name' because it's marked with '?'.""",
problemMessageTemplate: r"""Can't implement '#name' because it's nullable.""",
correctionMessageTemplate: r"""Try removing the question mark.""",
withArguments: _withArgumentsNullableInterfaceError,
);
@ -13621,8 +13621,8 @@ Message _withArgumentsNullableInterfaceError(String name) {
name = demangleMixinApplicationName(name);
return new Message(
codeNullableInterfaceError,
problemMessage:
"""Can't implement '${name}' because it's marked with '?'.""",
problemMessage: """Can't implement '${name}' because it's nullable.""",
correctionMessage: """Try removing the question mark.""",
arguments: {
'name': name,
},
@ -13633,8 +13633,8 @@ Message _withArgumentsNullableInterfaceError(String name) {
const Template<Message Function(String name)> templateNullableMixinError =
const Template<Message Function(String name)>(
"NullableMixinError",
problemMessageTemplate:
r"""Can't mix '#name' in because it's marked with '?'.""",
problemMessageTemplate: r"""Can't mix '#name' in because it's nullable.""",
correctionMessageTemplate: r"""Try removing the question mark.""",
withArguments: _withArgumentsNullableMixinError,
);
@ -13650,7 +13650,8 @@ Message _withArgumentsNullableMixinError(String name) {
name = demangleMixinApplicationName(name);
return new Message(
codeNullableMixinError,
problemMessage: """Can't mix '${name}' in because it's marked with '?'.""",
problemMessage: """Can't mix '${name}' in because it's nullable.""",
correctionMessage: """Try removing the question mark.""",
arguments: {
'name': name,
},
@ -13671,8 +13672,8 @@ const MessageCode messageNullableSpreadError = const MessageCode(
const Template<Message Function(String name)> templateNullableSuperclassError =
const Template<Message Function(String name)>(
"NullableSuperclassError",
problemMessageTemplate:
r"""Can't extend '#name' because it's marked with '?'.""",
problemMessageTemplate: r"""Can't extend '#name' because it's nullable.""",
correctionMessageTemplate: r"""Try removing the question mark.""",
withArguments: _withArgumentsNullableSuperclassError,
);
@ -13688,7 +13689,8 @@ Message _withArgumentsNullableSuperclassError(String name) {
name = demangleMixinApplicationName(name);
return new Message(
codeNullableSuperclassError,
problemMessage: """Can't extend '${name}' because it's marked with '?'.""",
problemMessage: """Can't extend '${name}' because it's nullable.""",
correctionMessage: """Try removing the question mark.""",
arguments: {
'name': name,
},

View file

@ -5767,13 +5767,16 @@ AwaitInLateLocalInitializer:
problemMessage: "`await` expressions are not supported in late local initializers."
NullableSuperclassError:
problemMessage: "Can't extend '#name' because it's marked with '?'."
problemMessage: "Can't extend '#name' because it's nullable."
correctionMessage: "Try removing the question mark."
NullableInterfaceError:
problemMessage: "Can't implement '#name' because it's marked with '?'."
problemMessage: "Can't implement '#name' because it's nullable."
correctionMessage: "Try removing the question mark."
NullableMixinError:
problemMessage: "Can't mix '#name' in because it's marked with '?'."
problemMessage: "Can't mix '#name' in because it's nullable."
correctionMessage: "Try removing the question mark."
JsInteropDartClassExtendsJSClass:
problemMessage: "Dart class '#name' cannot extend JS interop class '#name2'."

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's marked with '?'.
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's nullable.
// Try removing the question mark.
// enum E3 implements I? { // Error.
// ^^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's marked with '?'.
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's nullable.
// Try removing the question mark.
// enum E3 implements I? { // Error.
// ^^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's marked with '?'.
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's nullable.
// Try removing the question mark.
// enum E3 implements I? { // Error.
// ^^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's marked with '?'.
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's nullable.
// Try removing the question mark.
// enum E3 implements I? { // Error.
// ^^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's marked with '?'.
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's nullable.
// Try removing the question mark.
// enum E3 implements I? { // Error.
// ^^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's marked with '?'.
// pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart:21:20: Error: Can't implement 'I?' because it's nullable.
// Try removing the question mark.
// enum E3 implements I? { // Error.
// ^^
//

View file

@ -19,7 +19,8 @@ library;
// extension type E6(Null it) implements dynamic {} // Error.
// ^
//
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's marked with '?'.
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's nullable.
// Try removing the question mark.
// extension type E7(Null it) implements double? {} // Error.
// ^
//

View file

@ -19,7 +19,8 @@ library;
// extension type E6(Null it) implements dynamic {} // Error.
// ^
//
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's marked with '?'.
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's nullable.
// Try removing the question mark.
// extension type E7(Null it) implements double? {} // Error.
// ^
//

View file

@ -19,7 +19,8 @@ library;
// extension type E6(Null it) implements dynamic {} // Error.
// ^
//
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's marked with '?'.
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's nullable.
// Try removing the question mark.
// extension type E7(Null it) implements double? {} // Error.
// ^
//

View file

@ -19,7 +19,8 @@ library;
// extension type E6(Null it) implements dynamic {} // Error.
// ^
//
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's marked with '?'.
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's nullable.
// Try removing the question mark.
// extension type E7(Null it) implements double? {} // Error.
// ^
//

View file

@ -19,7 +19,8 @@ library;
// extension type E6(Null it) implements dynamic {} // Error.
// ^
//
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's marked with '?'.
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's nullable.
// Try removing the question mark.
// extension type E7(Null it) implements double? {} // Error.
// ^
//

View file

@ -19,7 +19,8 @@ library;
// extension type E6(Null it) implements dynamic {} // Error.
// ^
//
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's marked with '?'.
// pkg/front_end/testcases/extension_types/issue53840.dart:22:39: Error: Can't implement 'double?' because it's nullable.
// Try removing the question mark.
// extension type E7(Null it) implements double? {} // Error.
// ^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's nullable.
// Try removing the question mark.
// class B implements A? {} // Error.
// ^
//
@ -13,7 +14,8 @@ library;
// typedef F<T> = T;
// ^
//
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's nullable.
// Try removing the question mark.
// extension type EINullable(int? _) implements int? {} // Error.
// ^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's nullable.
// Try removing the question mark.
// class B implements A? {} // Error.
// ^
//
@ -13,7 +14,8 @@ library;
// typedef F<T> = T;
// ^
//
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's nullable.
// Try removing the question mark.
// extension type EINullable(int? _) implements int? {} // Error.
// ^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's nullable.
// Try removing the question mark.
// class B implements A? {} // Error.
// ^
//
@ -13,7 +14,8 @@ library;
// typedef F<T> = T;
// ^
//
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's nullable.
// Try removing the question mark.
// extension type EINullable(int? _) implements int? {} // Error.
// ^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's nullable.
// Try removing the question mark.
// class B implements A? {} // Error.
// ^
//
@ -13,7 +14,8 @@ library;
// typedef F<T> = T;
// ^
//
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's nullable.
// Try removing the question mark.
// extension type EINullable(int? _) implements int? {} // Error.
// ^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's nullable.
// Try removing the question mark.
// class B implements A? {} // Error.
// ^
//
@ -13,7 +14,8 @@ library;
// typedef F<T> = T;
// ^
//
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's nullable.
// Try removing the question mark.
// extension type EINullable(int? _) implements int? {} // Error.
// ^
//

View file

@ -2,7 +2,8 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:8:7: Error: Can't implement 'A?' because it's nullable.
// Try removing the question mark.
// class B implements A? {} // Error.
// ^
//
@ -13,7 +14,8 @@ library;
// typedef F<T> = T;
// ^
//
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's marked with '?'.
// pkg/front_end/testcases/general/issue54553.dart:5:46: Error: Can't implement 'int?' because it's nullable.
// Try removing the question mark.
// extension type EINullable(int? _) implements int? {} // Error.
// ^
//

View file

@ -2,59 +2,73 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Coo extends Boo with Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// class Doo extends Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Eoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Foo extends Boo? with Aoo {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Hoo extends Object with Aoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Ioo = Object with Aoo implements Boo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//

View file

@ -2,59 +2,73 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Coo extends Boo with Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// class Doo extends Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Eoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Foo extends Boo? with Aoo {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Hoo extends Object with Aoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Ioo = Object with Aoo implements Boo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//

View file

@ -2,59 +2,73 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Coo extends Boo with Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// class Doo extends Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Eoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Foo extends Boo? with Aoo {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Hoo extends Object with Aoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Ioo = Object with Aoo implements Boo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//

View file

@ -2,59 +2,73 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Coo extends Boo with Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// class Doo extends Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Eoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Foo extends Boo? with Aoo {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Hoo extends Object with Aoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Ioo = Object with Aoo implements Boo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//

View file

@ -2,59 +2,73 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Coo extends Boo with Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// class Doo extends Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Eoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Foo extends Boo? with Aoo {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Hoo extends Object with Aoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Ioo = Object with Aoo implements Boo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//

View file

@ -2,59 +2,73 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:12:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Coo extends Boo with Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:14:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// class Doo extends Aoo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:16:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Eoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:18:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Foo extends Boo? with Aoo {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:20:7: Error: Can't mix 'Aoo?' in because it's nullable.
// Try removing the question mark.
// class Goo = Boo? with Aoo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:22:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Hoo extends Object with Aoo implements Boo? {}
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:24:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// class Ioo = Object with Aoo implements Boo?;
// ^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:32:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo1 on Aoo? implements Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:34:7: Error: Can't extend 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo2 on Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Aoo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's marked with '?'.
// pkg/front_end/testcases/nnbd/forbidden_supers.dart:36:7: Error: Can't implement 'Boo?' because it's nullable.
// Try removing the question mark.
// mixin Moo3 implements Aoo?, Boo? {}
// ^^^^
//