-
Notifications
You must be signed in to change notification settings - Fork 28
/
versioning_A03_t01.dart
93 lines (78 loc) · 3.91 KB
/
versioning_A03_t01.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// 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 Any post-feature library declaration which has a platform library
/// class marked base or final as a superinterface must be marked base, final or
/// sealed, and cannot be implemented locally, even if the superinterface chain
/// goes through a pre-feature library declaration, and even if that declaration
/// ignores the base modifier.
///
/// @description Checks that it is a compile-time error if a declaration from a
/// post-feature library is not marked `base`, `final` or `sealed` extends a
/// platform library class marked `final` and the superinterface chain goes
/// through a pre-feature library declaration
/// @author [email protected]
/// @issue 52078
import "versioning_pre_feature_lib.dart";
class ClassExtendsPreFeatureExtendsFinal extends PreFeatureExtendsFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
class ClassExtendsPreFeatureImplementsFinal extends PreFeatureImplementsFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
class ClassExtendsPreFeatureWithFinal extends PreFeatureWithFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
interface class InterfaceClassExtendsPreFeatureExtendsFinal extends PreFeatureExtendsFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
interface class InterfaceClassExtendsPreFeatureImplementsFinal extends PreFeatureImplementsFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
interface class InterfaceClassExtendsPreFeatureWithFinal extends PreFeatureWithFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
abstract class AbstractClassExtendsPreFeatureExtendsFinal extends PreFeatureExtendsFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
abstract class AbstractClassExtendsPreFeatureImplementsFinal extends PreFeatureImplementsFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
abstract class AbstractClassExtendsPreFeatureWithFinal extends PreFeatureWithFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
abstract interface class AbstractInterfaceClassExtendsPreFeatureExtendsFinal extends PreFeatureExtendsFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
abstract interface class AbstractInterfaceClassExtendsPreFeatureImplementsFinal extends PreFeatureImplementsFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
abstract interface class AbstractInterfaceClassExtendsPreFeatureWithFinal extends PreFeatureWithFinal {}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
main() {
print(ClassExtendsPreFeatureExtendsFinal);
print(ClassExtendsPreFeatureImplementsFinal);
print(ClassExtendsPreFeatureWithFinal);
print(InterfaceClassExtendsPreFeatureExtendsFinal);
print(InterfaceClassExtendsPreFeatureImplementsFinal);
print(InterfaceClassExtendsPreFeatureWithFinal);
print(AbstractClassExtendsPreFeatureExtendsFinal);
print(AbstractClassExtendsPreFeatureImplementsFinal);
print(AbstractClassExtendsPreFeatureWithFinal);
print(AbstractInterfaceClassExtendsPreFeatureExtendsFinal);
print(AbstractInterfaceClassExtendsPreFeatureImplementsFinal);
print(AbstractInterfaceClassExtendsPreFeatureWithFinal);
}