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

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

Issue 219473007: Deferred prefix support in metadata (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | « runtime/vm/parser.cc ('k') | tests/language/language.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import 'package:async_helper/async_helper.dart'; 6 import 'package:async_helper/async_helper.dart';
7 import 'dart:mirrors';
7 8
8 import "deferred_constraints_constants_lib.dart" deferred as lib; 9 import "deferred_constraints_constants_lib.dart" deferred as lib;
9 10
10 const myConst1 = 11 const myConst1 =
11 lib.constantInstance; /// reference1: compile-time error 12 lib.constantInstance; /// reference1: compile-time error
12 /* /// reference1: continued 13 /* /// reference1: continued
13 499; 14 499;
14 */ /// reference1: continued 15 */ /// reference1: continued
15 const myConst2 = 16 const myConst2 =
16 lib.Const.instance; /// reference2: compile-time error 17 lib.Const.instance; /// reference2: compile-time error
(...skipping 30 matching lines...) Expand all
47 lib.loadLibrary().then((_) { 48 lib.loadLibrary().then((_) {
48 var instance = lib.constantInstance; 49 var instance = lib.constantInstance;
49 var c1 = const lib.Const(); /// constructor1: compile-time error 50 var c1 = const lib.Const(); /// constructor1: compile-time error
50 var c2 = const lib.Const.namedConstructor(); /// constructor2: compile-time error 51 var c2 = const lib.Const.namedConstructor(); /// constructor2: compile-time error
51 f1(); 52 f1();
52 f2(); 53 f2();
53 var constInstance = lib.constantInstance; /// reference_after_load: ok 54 var constInstance = lib.constantInstance; /// reference_after_load: ok
54 var h1 = new H1(); 55 var h1 = new H1();
55 var h2 = new H2(); 56 var h2 = new H2();
56 var h3 = new H3(); 57 var h3 = new H3();
58
59 // Need to access the metadata to trigger the expected compilation error.
60 reflectClass(H1).metadata; // metadata1: continued
61 reflectClass(H2).metadata; // metadata2: continued
62 reflectClass(H3).metadata; // metadata3: continued
63
57 asyncEnd(); 64 asyncEnd();
58 }); 65 });
59 } 66 }
60 67
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698