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

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

Issue 216383004: Merge initial implementation of deferred handling in the VM: (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 9 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/symbols.h ('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 7
8 import "deferred_constraints_lib.dart" deferred as lib; 8 import "deferred_constraints_lib.dart" deferred as lib;
9 import "deferred_constraints_lib.dart" as lib2; /// type_annotation_non_deferred : ok 9 import "deferred_constraints_lib.dart" as lib2; /// type_annotation_non_deferred : ok
10 10
11 class F {} 11 class F {}
12 class G2<T> {} 12 class G2<T> {}
13 13
14 main() { 14 main() {
15 lib.C a = null; /// type_annotation_null: static type warning 15 lib.C a = null; /// type_annotation_null: static type warning
16 Expect.throws(() { /// new_before_load: static type warning 16 Expect.throws(() { /// new_before_load: static type warning
17 lib.C a = new lib.C(); /// new_before_load: continued 17 lib.C a = new lib.C(); /// new_before_load: continued
18 }, (e) => e is NoSuchMethodError); /// new_before_load: continued 18 }, (e) => e is Error); /// new_before_load: continued
19 19
20 // In this case we do not defer C. 20 // In this case we do not defer C.
21 lib2.C a1 = new lib2.C(); /// type_annotation_non_deferred: continued 21 lib2.C a1 = new lib2.C(); /// type_annotation_non_deferred: continued
22 asyncStart(); 22 asyncStart();
23 lib.loadLibrary().then((_) { 23 lib.loadLibrary().then((_) {
24 lib.C a2 = new lib.C(); /// type_annotation1: dynamic type error, static typ e warning 24 lib.C a2 = new lib.C(); /// type_annotation1: dynamic type error, static typ e warning
25 lib.G<F> a3 = new lib.G<F>(); /// type_annotation_generic1: dynamic type err or, static type warning 25 lib.G<F> a3 = new lib.G<F>(); /// type_annotation_generic1: dynamic type err or, static type warning
26 G2<lib.C> a4 = new G2(); /// type_annotation_generic2: static type warning 26 G2<lib.C> a4 = new G2(); /// type_annotation_generic2: static type warning
27 G2<lib.C> a5 = new G2<lib.C>(); /// type_annotation_generic3: static type wa rning 27 G2<lib.C> a5 = new G2<lib.C>(); /// type_annotation_generic3: static type wa rning
28 lib.G<lib.C> a = new lib.G<lib.C>(); /// type_annotation_generic4: dynamic t ype error, static type warning 28 lib.G<lib.C> a = new lib.G<lib.C>(); /// type_annotation_generic4: dynamic t ype error, static type warning
(...skipping 12 matching lines...) Expand all
41 }, (e) => e is TypeError); /// as_operation: continued 41 }, (e) => e is TypeError); /// as_operation: continued
42 Expect.throws(() { /// catch_check: static type warning 42 Expect.throws(() { /// catch_check: static type warning
43 try { throw instance; } on lib.Const {} /// catch_check: continued 43 try { throw instance; } on lib.Const {} /// catch_check: continued
44 }, (e) => e is TypeError); /// catch_check: continued 44 }, (e) => e is TypeError); /// catch_check: continued
45 int i = lib.C.staticMethod(); /// static_method: ok 45 int i = lib.C.staticMethod(); /// static_method: ok
46 asyncEnd(); 46 asyncEnd();
47 }); 47 });
48 } 48 }
49 49
50 lib.C a9 = null; /// type_annotation_top_level: static type warning 50 lib.C a9 = null; /// type_annotation_top_level: static type warning
OLDNEW
« no previous file with comments | « runtime/vm/symbols.h ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698