| // 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 Abstract base class can be extended but not constructed, |
| /// implemented or mixed in and is not exhaustive |
| /// |
| /// @description Check that it is a compile-time error to construct an |
| /// `abstract base class` |
| /// @author sgrekhov22@gmail.com |
| |
| import "class_modifiers_lib.dart"; |
| |
| abstract base class LocalAbstractBaseClass {} |
| |
| abstract base class LocalAbstractBaseClassWithConstructor { |
| LocalAbstractClassWithConstructor() {} |
| } |
| |
| main() { |
| AbstractBaseClass(); |
| //^^^^^^^^^^^^^^^^^ |
| // [analyzer] unspecified |
| // [cfe] unspecified |
| |
| LocalAbstractBaseClass(); |
| //^^^^^^^^^^^^^^^^^^^^^^ |
| // [analyzer] unspecified |
| // [cfe] unspecified |
| |
| LocalAbstractBaseClassWithConstructor(); |
| //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| // [analyzer] unspecified |
| // [cfe] unspecified |
| } |