-
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
Add augmenting types tests. Part 2
- Loading branch information
Showing
30 changed files
with
1,680 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
LanguageFeatures/Augmentation-libraries/augmenting_types_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,23 @@ | ||
// Copyright (c) 2024, 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: | ||
/// ... | ||
/// - The augmenting type and corresponding type do not have all the same | ||
/// modifiers (final, sealed, mixin, etc). | ||
/// | ||
/// @description Checks that it is a compile-time error if an augmenting type | ||
/// and corresponding type do not have all the same modifiers (final, sealed, | ||
/// mixin, etc). Test `class` in the main library | ||
/// @author sgrekhov22@gmail.com | ||
// SharedOptions=--enable-experiment=macros | ||
|
||
import augment 'augmenting_types_A02_t01_lib.dart'; | ||
|
||
class C {} | ||
|
||
main() { | ||
print(C); | ||
} |
89 changes: 89 additions & 0 deletions
89
LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01_lib.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,89 @@ | ||
// Copyright (c) 2024, 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: | ||
/// ... | ||
/// - The augmenting type and corresponding type do not have all the same | ||
/// modifiers (final, sealed, mixin, etc). | ||
/// | ||
/// @description Checks that it is a compile-time error if an augmenting type | ||
/// and corresponding type do not have all the same modifiers (final, sealed, | ||
/// mixin, etc). Test `class` in the main library | ||
/// @author sgrekhov22@gmail.com | ||
// SharedOptions=--enable-experiment=macros | ||
|
||
library augment 'augmenting_types_A02_t01.dart'; | ||
|
||
augment class C {} // Ok | ||
|
||
augment base class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment interface class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment final class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment sealed class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract base class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract interface class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract final class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment base mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract base mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment mixin C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment base mixin C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified |
23 changes: 23 additions & 0 deletions
23
LanguageFeatures/Augmentation-libraries/augmenting_types_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,23 @@ | ||
// Copyright (c) 2024, 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: | ||
/// ... | ||
/// - The augmenting type and corresponding type do not have all the same | ||
/// modifiers (final, sealed, mixin, etc). | ||
/// | ||
/// @description Checks that it is a compile-time error if an augmenting type | ||
/// and corresponding type do not have all the same modifiers (final, sealed, | ||
/// mixin, etc). Test `base class` in the main library | ||
/// @author sgrekhov22@gmail.com | ||
// SharedOptions=--enable-experiment=macros | ||
|
||
import augment 'augmenting_types_A02_t02_lib.dart'; | ||
|
||
base class C {} | ||
|
||
main() { | ||
print(C); | ||
} |
89 changes: 89 additions & 0 deletions
89
LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02_lib.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,89 @@ | ||
// Copyright (c) 2024, 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: | ||
/// ... | ||
/// - The augmenting type and corresponding type do not have all the same | ||
/// modifiers (final, sealed, mixin, etc). | ||
/// | ||
/// @description Checks that it is a compile-time error if an augmenting type | ||
/// and corresponding type do not have all the same modifiers (final, sealed, | ||
/// mixin, etc). Test `base class` in the main library | ||
/// @author sgrekhov22@gmail.com | ||
// SharedOptions=--enable-experiment=macros | ||
|
||
library augment 'augmenting_types_A02_t02.dart'; | ||
|
||
augment class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment base class C {} // Ok | ||
|
||
augment interface class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment final class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment sealed class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract base class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract interface class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract final class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment base mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract base mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment mixin C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment base mixin C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified |
23 changes: 23 additions & 0 deletions
23
LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03.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,23 @@ | ||
// Copyright (c) 2024, 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: | ||
/// ... | ||
/// - The augmenting type and corresponding type do not have all the same | ||
/// modifiers (final, sealed, mixin, etc). | ||
/// | ||
/// @description Checks that it is a compile-time error if an augmenting type | ||
/// and corresponding type do not have all the same modifiers (final, sealed, | ||
/// mixin, etc). Test `interface class` in the main library | ||
/// @author sgrekhov22@gmail.com | ||
// SharedOptions=--enable-experiment=macros | ||
|
||
import augment 'augmenting_types_A02_t03_lib.dart'; | ||
|
||
interface class C {} | ||
|
||
main() { | ||
print(C); | ||
} |
89 changes: 89 additions & 0 deletions
89
LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03_lib.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,89 @@ | ||
// Copyright (c) 2024, 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: | ||
/// ... | ||
/// - The augmenting type and corresponding type do not have all the same | ||
/// modifiers (final, sealed, mixin, etc). | ||
/// | ||
/// @description Checks that it is a compile-time error if an augmenting type | ||
/// and corresponding type do not have all the same modifiers (final, sealed, | ||
/// mixin, etc). Test `interface class` in the main library | ||
/// @author sgrekhov22@gmail.com | ||
// SharedOptions=--enable-experiment=macros | ||
|
||
library augment 'augmenting_types_A02_t03.dart'; | ||
|
||
augment class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment base class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment interface class C {} // Ok | ||
|
||
augment final class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment sealed class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract base class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract interface class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract final class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment base mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment abstract base mixin class C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment mixin C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified | ||
|
||
augment base mixin C {} | ||
// ^ | ||
// [analyzer] unspecified | ||
// [cfe] unspecified |
23 changes: 23 additions & 0 deletions
23
LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04.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,23 @@ | ||
// Copyright (c) 2024, 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: | ||
/// ... | ||
/// - The augmenting type and corresponding type do not have all the same | ||
/// modifiers (final, sealed, mixin, etc). | ||
/// | ||
/// @description Checks that it is a compile-time error if an augmenting type | ||
/// and corresponding type do not have all the same modifiers (final, sealed, | ||
/// mixin, etc). Test `final class` in the main library | ||
/// @author sgrekhov22@gmail.com | ||
// SharedOptions=--enable-experiment=macros | ||
|
||
import augment 'augmenting_types_A02_t04_lib.dart'; | ||
|
||
final class C {} | ||
|
||
main() { | ||
print(C); | ||
} |
Oops, something went wrong.