Index: tests/language/generalized_void_syntax_test.dart |
diff --git a/tests/language/generalized_void_syntax_test.dart b/tests/language/generalized_void_syntax_test.dart |
index 0222eb33c0265be82462639900db7cd4e2731afb..47fcad36dfab24b14149686159d090c9153b460f 100644 |
--- a/tests/language/generalized_void_syntax_test.dart |
+++ b/tests/language/generalized_void_syntax_test.dart |
@@ -2,11 +2,12 @@ |
// 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. |
-// Testing that the reserved word `void` is allowed to occur as a type, not |
-// just as a return type. |
+// Testing that the reserved word `void` is allowed to occur as a type. |
+ |
+import 'package:expect/expect.dart'; |
class A<T> { |
- final T t; |
+ T t; |
const A(this.t); |
} |
@@ -28,25 +29,23 @@ void m2(void x, {void y}) => null; |
A<void> m3(A<void> x, [A<void> y]) => new A<void>(null); |
A<void> m4(A<void> x, {A<void> y}) => new A<void>(null); |
-class B<S, T> implements A<void> { void get t => null; } |
+class B<S, T> {} |
-class C extends A<void> with B<void, A<void>> { |
- C(): super(null); |
- |
+class C extends A<void> with B<void, A<void>> implements A<void> { |
static final void x1 = null; |
static final A<void> x2 = new A<void>(null); |
static const void x3 = null; |
static const A<void> x4 = const A<void>(null); |
- final void x5 = null; |
- final A<void> x6 = new A<void>(null); |
+ final void x5 = null, x6; |
+ final A<void> x7 = new A<void>(null), x8; |
- static void x7 = null, x8; |
- static A<void> x9 = new A<void>(null), x10; |
+ static void x9 = null, x10; |
+ static A<void> x11 = new A<void>(null), x12; |
- covariant void x11 = null, x12; |
- covariant A<void> x13 = new A<void>(null), x14; |
+ covariant void x13 = null, x14; |
+ covariant A<void> x15 = new A<void>(null), x16; |
static void get g1 => null; |
static A<void> get g2 => new A<void>(null); |
@@ -68,10 +67,8 @@ class C extends A<void> with B<void, A<void>> { |
// Ensure that all members are used, and use `void` in expressions. |
void run() { |
- var ignore = [ |
- x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, // |
- g1, g2, g3, g4, |
- ]; |
+ var ignore = [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, |
+ x15, x16, g1, g2, g3, g4]; |
s1 = null; |
s2 = new A<void>(null); |