blob: efe8017454e27b245f7baea4f2835a629a86774a [file]
// 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 Final class can be constructed but not extended, implemented or
/// mixed in and is not exhaustive
///
/// @description Checks that it is a compile-time error to declare a mixin on a
/// `final class` outside of the library where it is defined
/// @author sgrekhov22@gmail.com
import "class_modifiers_lib.dart";
mixin MixinOnFinalClass on FinalClass {}
// ^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
base mixin BaseMixinOnFinalClass on FinalClass {}
// ^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
main() {
print(MixinOnFinalClass);
print(BaseMixinOnFinalClass);
}