Skip to content

Commit 8ae733c

Browse files
author
Sergey G. Grekhov
committed
Fix for issue #129. Added test with expects compile time error if class C is superinterface of C
1 parent 4acb137 commit 8ae733c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Language/Classes/definition_t24.dart

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
}

0 commit comments

Comments
 (0)