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

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

Issue 10880026: Record literal list type arguments and report errors when there are too many. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated dart2dart status Created 8 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 | Annotate | Revision Log
« no previous file with comments | « dart/tests/language/language.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS 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 interface I {}
6
7 void main() {
8 var list;
9 list = <int
10 I /// 00: compile-time error
11 , int /// 01: compile-time error
12 >[0];
13 Expect.equals(1, list.length);
14
15 list = <int
16 , int /// 02: compile-time error
17 , int /// 02: continued
18 >[0];
19 Expect.equals(1, list.length);
20
21 list = <int
22 , int /// 03: compile-time error
23 , int /// 03: continued
24 , int /// 03: continued
25 >[0];
26 Expect.equals(1, list.length);
27
28 list =
29 <> /// 04: compile-time error
30 [0];
31 Expect.equals(1, list.length);
32
33 list =
34 <<>> /// 05: compile-time error
35 [0];
36 Expect.equals(1, list.length);
37
38 list =
39 <<<>>> /// 06: compile-time error
40 [0];
41 Expect.equals(1, list.length);
42
43 list =
44 <[]> /// 07: compile-time error
45 [0];
46 Expect.equals(1, list.length);
47
48 list = <int>[<int>[<int>[1][0]][0]];
49 Expect.equals(1, list.length);
50 Expect.equals(1, list[0]);
51
52 list = <int>[<List<int>>[[1]][0][0]];
53 Expect.equals(1, list.length);
54 Expect.equals(1, list[0]);
55 }
OLDNEW
« no previous file with comments | « dart/tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698