[tests] Update tests where analyzer mixin applications were failing.

Bug: https://github.com/dart-lang/sdk/issues/51808
Change-Id: I0c3951ab28f96cf1794e0ac1088c975c11935bf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290660
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This commit is contained in:
Kallen Tu 2023-03-22 22:51:34 +00:00 committed by Commit Queue
parent 199ac35f8e
commit c7cee7fd46
3 changed files with 25 additions and 23 deletions

View file

@ -104,14 +104,14 @@ interface class InterfaceExtendWith extends BaseClass with _MixinOnObject {}
// Extending via an anonymous mixin application class.
class SimpleExtendApplication = BaseClass with _MixinOnObject;
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'SimpleExtendApplication' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
// [analyzer] unspecified
interface class InterfaceExtendApplication = BaseClass with _MixinOnObject;
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'InterfaceExtendApplication' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
// [analyzer] unspecified
/// It is an error if BaseClass is implemented by something which is not base,
/// final or sealed.
@ -164,7 +164,8 @@ base mixin class BaseMixinClassImplement implements BaseClass {}
// Implementing with a mixin application class.
class SimpleImplementApplication = Object
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'SimpleImplementApplication' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
with
_MixinOnObject
@ -182,7 +183,8 @@ base class BaseImplementApplication = Object
// [cfe] The class 'BaseClass' can't be implemented outside of its library because it's a base class.
interface class InterfaceImplementApplication = Object
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'InterfaceImplementApplication' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
with
_MixinOnObject

View file

@ -52,7 +52,7 @@ interface class InterfaceSealedExtendImplement implements SealedExtend {}
// [cfe] The type 'InterfaceSealedExtendImplement' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
mixin class MixinClassSealedExtendImplement implements SealedExtend {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'MixinClassSealedExtendImplement' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
@ -65,7 +65,6 @@ mixin MixinSealedExtendImplement implements SealedExtend {}
mixin MixinSealedExtendOn on SealedExtend {}
// ^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// ^
// [cfe] The type 'MixinSealedExtendOn' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
// Extending via an anonymous mixin class.
@ -81,13 +80,13 @@ interface class InterfaceExtendWith extends BaseClass with _MixinOnObject {}
// Extending via an anonymous mixin application class.
class SimpleExtendApplication = BaseClass with _MixinOnObject;
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'SimpleExtendApplication' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
// [analyzer] unspecified
interface class InterfaceExtendApplication = BaseClass with _MixinOnObject;
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'InterfaceExtendApplication' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
// [analyzer] unspecified
/// It is an error if BaseClass is implemented by something which is not base,
/// final or sealed.
@ -154,16 +153,17 @@ interface class InterfaceMixinClassImplementApplied extends Object
// Implementing with a mixin application class.
interface class InterfaceImplementApplication = Object
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'InterfaceImplementApplication' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
with
_MixinOnObject
implements
BaseClass;
class SimpleImplementApplication = Object
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'SimpleImplementApplication' must be 'base', 'final' or 'sealed' because the supertype 'BaseClass' is 'base'.
// [analyzer] unspecified
with
_MixinOnObject
implements

View file

@ -80,14 +80,14 @@ interface class InterfaceExtendWith extends FinalClass with _MixinOnObject {}
// Extending via an anonymous mixin application class.
class SimpleExtendApplication = FinalClass with _MixinOnObject;
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'SimpleExtendApplication' must be 'base', 'final' or 'sealed' because the supertype 'FinalClass' is 'final'.
// [analyzer] unspecified
interface class InterfaceExtendApplication = FinalClass with _MixinOnObject;
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'InterfaceExtendApplication' must be 'base', 'final' or 'sealed' because the supertype 'FinalClass' is 'final'.
// [analyzer] unspecified
/// It is an error if FinalClass is implemented by something which is not base,
/// final or sealed.
@ -154,17 +154,17 @@ interface class InterfaceMixinClassImplementApplied extends Object
// Implementing with a mixin application class.
interface class InterfaceImplementApplication = Object
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'InterfaceImplementApplication' must be 'base', 'final' or 'sealed' because the supertype 'FinalClass' is 'final'.
// [analyzer] unspecified
with
_MixinOnObject
implements
FinalClass;
class SimpleImplementApplication = Object
// ^
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED
// [cfe] The type 'SimpleImplementApplication' must be 'base', 'final' or 'sealed' because the supertype 'FinalClass' is 'final'.
// [analyzer] unspecified
with
_MixinOnObject
implements