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

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

Issue 1219023002: Redirection type of a redirecting factory can be deferred (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add test case Created 5 years, 5 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
« no previous file with comments | « tests/language/regress_23408_lib.dart ('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) 2015, 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 library regress_23408_test;
6
7 import 'package:expect/expect.dart';
8
9 import 'regress_23408_lib.dart' deferred as lib;
10
11 class A<T> extends C {
12 get t => "$T";
13 }
14
15 class C {
16 var v = 55;
17 C();
18 factory C.c() = lib.K;
19 factory C.l() = A<lib.K>;
20 }
21
22 void main() {
23 var a = new C.l(); // Redirects to A<dynamic>
24 Expect.equals("dynamic", a.t);
25 Expect.throws(() => new C.c());
26 lib.loadLibrary().then((_) {
27 var b = new C.l(); // Still redirects to A<dynamic>
28 Expect.equals("dynamic", b.t);
29 var z = new C.c();
30 Expect.equals(55, z.v);
31 });
32 }
OLDNEW
« no previous file with comments | « tests/language/regress_23408_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698