File tree 2 files changed +33
-11
lines changed 2 files changed +33
-11
lines changed Original file line number Diff line number Diff line change 12
12
* @description Checks that various class definitions that are valid according
13
13
* to 'metadata abstract? class mixinApplicationClass' syntax do not cause any
14
14
* errors and can be instantiated.
15
- * @author golovleva
15
+
16
+
17
+ * @issue dart-lang/co19#129
16
18
*/
17
19
18
20
@A () abstract class I1 <T > = A1 with B1 ;
@@ -25,16 +27,9 @@ abstract class J2 = A1 with B1;
25
27
@B () class X2 = A1 with B1 ;
26
28
class Y2 = A1 with B1 ;
27
29
28
- @A () abstract class I3 <T > = A1 with B1 implements A1 ;
29
- abstract class J3 <T > = A1 with B1 implements A1 ;
30
30
@B () class X3 <T > = B1 with A1 implements A1 ;
31
31
class Y3 <T > = B1 with A1 implements A1 ;
32
32
33
- @A () abstract class I4 = A1 with B1 implements A1 ;
34
- abstract class J4 = A1 with B1 implements A1 ;
35
- @B () class X4 = A1 with B1 implements A1 ;
36
- class Y4 = A1 with B1 implements A1 ;
37
-
38
33
abstract class A1 {}
39
34
class B1 {}
40
35
@@ -56,7 +51,4 @@ main() {
56
51
57
52
X3 x3 = new X3 ();
58
53
Y3 y3 = new Y3 ();
59
-
60
- X4 x4 = new X4 ();
61
- Y4 y4 = new Y4 ();
62
54
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3
+ * for details. All rights reserved. Use of this source code is governed by a
4
+ * BSD-style license that can be found in the LICENSE file.
5
+ */
6
+ /**
7
+ * @assertion classDefinition:
8
+ * metadata abstract? class identifier typeParameters? (superclass mixins?)?
9
+ * interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ |
10
+ * metadata abstract? class mixinApplicationClass
11
+ * ;
12
+ * ...
13
+ * It is a compile-time error if the superclass of a class C is specified as a
14
+ * superinterface of C.
15
+ * ...
16
+ * @description Checks that it is a compile-time error if the superclass of a
17
+ * class C is specified as a superinterface of C.
18
+ * @compile-error
19
+
20
+ * @issue dart-lang/co19#129
21
+ * @issue 31624
22
+ */
23
+ class X = A with B implements A ;
24
+
25
+ abstract class A {}
26
+ class B {}
27
+
28
+ main () {
29
+ new X ();
30
+ }
You can’t perform that action at this time.
0 commit comments