Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: tests/language/type_variable_conflict_test.dart

Issue 3007803002: Migrate block 162 to Dart 2.0.
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
eernst 2017/09/04 17:04:57 Lost coverage: don't delete this file.
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Test that we report a compile-time error when a type parameter conflicts
6 // with an instance or static member with the same name.
7
8 import "package:expect/expect.dart";
9
10 class G1<T> {
11 var T; // //# 01: compile-time error
12 }
13
14 class G2<T> {
15 get T {} // //# 02: compile-time error
16 }
17
18 class G3<T> {
19 T() {} // //# 03: compile-time error
20 }
21
22 class G4<T> {
23 static var T; // //# 04: compile-time error
24 }
25
26 class G5<T> {
27 static get T {} // //# 05: compile-time error
28 }
29
30 class G6<T> {
31 static T() {} // //# 06: compile-time error
32 }
33
34 main() {
35 new G1<int>();
36 new G2<int>();
37 new G3<int>();
38 new G4<int>();
39 new G5<int>();
40 new G6<int>();
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698