-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Test valid combinations of modifiers. Part 3
- Loading branch information
Showing
60 changed files
with
2,914 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
LanguageFeatures/Class-modifiers/syntax_abstract_base_mixin_class_A01_t01.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// 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 mixin class can be extended and mixed in but not | ||
/// constructed, implemented and is not exhaustive | ||
/// | ||
/// @description Checks that an `abstract base mixin class` cannot be | ||
/// constructed | ||
/// @author [email protected] | ||
// SharedOptions=--enable-experiment=class-modifiers | ||
|
||
import "class_modifiers_lib.dart"; | ||
|
||
abstract base mixin class LocalAbstractBaseMixinClass {} | ||
|
||
main() { | ||
AbstractBaseMixinClass(); | ||
//^^^^^^^^^^^^^^^^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
LocalAbstractBaseMixinClass(); | ||
//^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
} |
39 changes: 39 additions & 0 deletions
39
LanguageFeatures/Class-modifiers/syntax_abstract_base_mixin_class_A02_t01.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// 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 mixin class can be extended and mixed in but not | ||
/// constructed, implemented and is not exhaustive | ||
/// | ||
/// @description Checks that an `abstract base mixin class` can be extended by | ||
/// `base/final/sealed` outside of the library where it is defined (other cases | ||
/// are tested in `basic_restrictions_A04_t*`) | ||
/// @author [email protected] | ||
// SharedOptions=--enable-experiment=class-modifiers | ||
|
||
import "class_modifiers_lib.dart"; | ||
|
||
base class BaseClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
final class FinalClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
sealed class SealedClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
abstract base class AbstractBaseClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
abstract final class AbstractFinalClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
main() { | ||
BaseMixinClass(); | ||
print(BaseClassExtendsAbstractBaseMixinClass); | ||
print(FinalClassExtendsAbstractBaseMixinClass); | ||
print(SealedClassExtendsAbstractBaseMixinClass); | ||
print(AbstractBaseClassExtendsAbstractBaseMixinClass); | ||
print(AbstractFinalClassExtendsAbstractBaseMixinClass); | ||
} |
38 changes: 38 additions & 0 deletions
38
LanguageFeatures/Class-modifiers/syntax_abstract_base_mixin_class_A02_t02.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// 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 mixin class can be extended and mixed in but not | ||
/// constructed, implemented and is not exhaustive | ||
/// | ||
/// @description Checks that an `abstract base mixin class` can be extended by | ||
/// `base/final/sealed` in the same library where it is defined (other cases | ||
/// are tested in `basic_restrictions_A04_t*`) | ||
/// @author [email protected] | ||
// SharedOptions=--enable-experiment=class-modifiers | ||
|
||
abstract base mixin class AbstractBaseMixinClass {} | ||
|
||
base class BaseClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
final class FinalClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
sealed class SealedClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
abstract base class AbstractBaseClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
abstract final class AbstractFinalClassExtendsAbstractBaseMixinClass | ||
extends AbstractBaseMixinClass {} | ||
|
||
main() { | ||
print(BaseClassExtendsAbstractBaseMixinClass); | ||
print(FinalClassExtendsAbstractBaseMixinClass); | ||
print(SealedClassExtendsAbstractBaseMixinClass); | ||
print(AbstractBaseClassExtendsAbstractBaseMixinClass); | ||
print(AbstractFinalClassExtendsAbstractBaseMixinClass); | ||
} |
Oops, something went wrong.