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

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

Issue 40863002: Handle metadata with type literals or qualified identifiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « tests/language/language_analyzer2.status ('k') | tests/lib/lib.status » ('j') | 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 import "package:expect/expect.dart";
6
7 // Test that is is an error to use type arguments in metadata without
8 // parens.
9
10 @Bar()
11 @List<String> /// 01: compile-time error
12 class Bar {
13 @Bar()
14 @List<String> /// 02: compile-time error
15 const Bar();
16
17 @Bar()
18 @List<String> /// 03: compile-time error
19 final x = 'x';
20
21 @unknown /// 04: compile-time error
22 final y = 'y';
23
24 @Bar /// 05: compile-time error
25 final z = 'z';
26
27 @1234 /// 06: compile-time error
28 final w = 'w';
29 }
30
31 main() {
32 Expect.equals('x', new Bar().x);
33 Expect.equals('x', const Bar().x);
34 Expect.equals('y', new Bar().y);
35 Expect.equals('y', const Bar().y);
36 Expect.equals('z', new Bar().z);
37 Expect.equals('z', const Bar().z);
38 Expect.equals('z', new Bar().z);
39 Expect.equals('z', const Bar().z);
40 Expect.equals('w', new Bar().w);
41 Expect.equals('w', const Bar().w);
42 }
OLDNEW
« no previous file with comments | « tests/language/language_analyzer2.status ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698