blob: 0eab4ce7caceb087c89267c33dce7fb4604353f6 [file] [log] [blame] [edit]
// 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.
/// @assertion It is a compile-time error if:
/// ...
/// - A declaration has a base or final superdeclaration, and is not itself
/// marked base, final or sealed.
///
/// @description Check that it is a compile-time error if a declaration is not
/// `base`, `final` or `sealed` and has a superdeclaration marked `final`. Test
/// `abstract final` superdeclaration in another library
/// @author sgrekhov22@gmail.com
import "class_modifiers_lib.dart";
class ExtendsFinalClass extends AbstractFinalClass {}
// ^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
interface class InterfaceExtendsFinalClass extends AbstractFinalClass {}
// ^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
abstract class AbstractExtendsFinalClass extends AbstractFinalClass {}
// ^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
abstract interface class AbstractInterfaceExtendsFinalClass extends AbstractFinalClass {}
// ^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
mixin MixinOnFinalClass on AbstractFinalClass {}
// ^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
main() {
print(ExtendsFinalClass);
print(InterfaceExtendsFinalClass);
print(AbstractExtendsFinalClass);
print(AbstractInterfaceExtendsFinalClass);
print(MixinOnFinalClass);
}