From acb56cddc33480bdcd5ecdc8c67dc87da8b672cf Mon Sep 17 00:00:00 2001 From: "Sergey G. Grekhov" Date: Mon, 25 Mar 2024 14:26:57 +0700 Subject: [PATCH] #2559. Add augmenting types tests. Part 2 (#2569) Add augmenting types tests. Part 2 --- .../augmenting_types_A02_t01.dart | 23 +++++ .../augmenting_types_A02_t01_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t02.dart | 23 +++++ .../augmenting_types_A02_t02_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t03.dart | 23 +++++ .../augmenting_types_A02_t03_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t04.dart | 23 +++++ .../augmenting_types_A02_t04_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t05.dart | 23 +++++ .../augmenting_types_A02_t05_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t06.dart | 23 +++++ .../augmenting_types_A02_t06_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t07.dart | 23 +++++ .../augmenting_types_A02_t07_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t08.dart | 23 +++++ .../augmenting_types_A02_t08_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t09.dart | 23 +++++ .../augmenting_types_A02_t09_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t10.dart | 23 +++++ .../augmenting_types_A02_t10_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t11.dart | 23 +++++ .../augmenting_types_A02_t11_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t12.dart | 23 +++++ .../augmenting_types_A02_t12_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t13.dart | 23 +++++ .../augmenting_types_A02_t13_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t14.dart | 23 +++++ .../augmenting_types_A02_t14_lib.dart | 89 +++++++++++++++++++ .../augmenting_types_A02_t15.dart | 23 +++++ .../augmenting_types_A02_t15_lib.dart | 89 +++++++++++++++++++ 30 files changed, 1680 insertions(+) create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t05.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t05_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t06.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t06_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t07.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t07_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t08.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t08_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t09.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t09_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t10.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t10_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t11.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t11_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t12.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t12_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t13.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t13_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t14.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t14_lib.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t15.dart create mode 100644 LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t15_lib.dart diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01.dart new file mode 100644 index 0000000000..8560da3c3c --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01.dart @@ -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); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01_lib.dart new file mode 100644 index 0000000000..809d58fe9b --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t01_lib.dart @@ -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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02.dart new file mode 100644 index 0000000000..666fe677db --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02.dart @@ -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); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02_lib.dart new file mode 100644 index 0000000000..ef835270ee --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t02_lib.dart @@ -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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03.dart new file mode 100644 index 0000000000..5a0ed4a6a2 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03.dart @@ -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); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03_lib.dart new file mode 100644 index 0000000000..6db30458b0 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t03_lib.dart @@ -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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04.dart new file mode 100644 index 0000000000..147a88c5ec --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04.dart @@ -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); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04_lib.dart new file mode 100644 index 0000000000..53249695d9 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t04_lib.dart @@ -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 `final class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t04.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +augment base class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +augment interface class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +augment final class C {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t05.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t05.dart new file mode 100644 index 0000000000..99d3bff7f4 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t05.dart @@ -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 `sealed class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t05_lib.dart'; + +sealed class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t05_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t05_lib.dart new file mode 100644 index 0000000000..7dde366a46 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t05_lib.dart @@ -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 `sealed class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t05.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t06.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t06.dart new file mode 100644 index 0000000000..2d05fee847 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t06.dart @@ -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 `abstract class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t06_lib.dart'; + +abstract class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t06_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t06_lib.dart new file mode 100644 index 0000000000..d631e9f0c7 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t06_lib.dart @@ -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 `abstract class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t06.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t07.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t07.dart new file mode 100644 index 0000000000..d7550a5ee6 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t07.dart @@ -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 `abstract base class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t07_lib.dart'; + +abstract base class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t07_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t07_lib.dart new file mode 100644 index 0000000000..693387867e --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t07_lib.dart @@ -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 `abstract base class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t07.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t08.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t08.dart new file mode 100644 index 0000000000..749ba87808 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t08.dart @@ -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 `abstract interface class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t08_lib.dart'; + +abstract interface class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t08_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t08_lib.dart new file mode 100644 index 0000000000..df2312e6ea --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t08_lib.dart @@ -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 `abstract interface class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t08.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t09.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t09.dart new file mode 100644 index 0000000000..724b093366 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t09.dart @@ -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 `abstract final class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t09_lib.dart'; + +abstract final class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t09_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t09_lib.dart new file mode 100644 index 0000000000..e525146184 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t09_lib.dart @@ -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 `abstract final class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t09.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t10.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t10.dart new file mode 100644 index 0000000000..a414b83aa3 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t10.dart @@ -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 `mixin class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t10_lib.dart'; + +mixin class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t10_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t10_lib.dart new file mode 100644 index 0000000000..138a57e8a2 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t10_lib.dart @@ -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 `mixin class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t10.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t11.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t11.dart new file mode 100644 index 0000000000..cbbb2db11d --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t11.dart @@ -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 mixin class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t11_lib.dart'; + +base mixin class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t11_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t11_lib.dart new file mode 100644 index 0000000000..237d0ef2e0 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t11_lib.dart @@ -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 mixin class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t11.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t12.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t12.dart new file mode 100644 index 0000000000..a8357c3868 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t12.dart @@ -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 `abstract mixin class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t12_lib.dart'; + +abstract mixin class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t12_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t12_lib.dart new file mode 100644 index 0000000000..632b3d711f --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t12_lib.dart @@ -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 `abstract mixin class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t12.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +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 diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t13.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t13.dart new file mode 100644 index 0000000000..d2c29a3a7f --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t13.dart @@ -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 `abstract base mixin class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t13_lib.dart'; + +abstract base mixin class C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t13_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t13_lib.dart new file mode 100644 index 0000000000..19b949c4f2 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t13_lib.dart @@ -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 `abstract base mixin class` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t13.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +augment mixin C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +augment base mixin C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t14.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t14.dart new file mode 100644 index 0000000000..5ac40252de --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t14.dart @@ -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 `mixin` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t14_lib.dart'; + +mixin C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t14_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t14_lib.dart new file mode 100644 index 0000000000..e1726aecae --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t14_lib.dart @@ -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 `mixin` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t14.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok + +augment base mixin C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t15.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t15.dart new file mode 100644 index 0000000000..5d53dd1bb5 --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t15.dart @@ -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 mixin` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +import augment 'augmenting_types_A02_t15_lib.dart'; + +base mixin C {} + +main() { + print(C); +} diff --git a/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t15_lib.dart b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t15_lib.dart new file mode 100644 index 0000000000..123869316f --- /dev/null +++ b/LanguageFeatures/Augmentation-libraries/augmenting_types_A02_t15_lib.dart @@ -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 mixin` in the main library +/// @author sgrekhov22@gmail.com + +// SharedOptions=--enable-experiment=macros + +library augment 'augmenting_types_A02_t15.dart'; + +augment class C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +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 {} // Ok