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

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

Issue 11369168: Fix result type checking of factory constructors of generic classes in VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/parser.cc ('k') | tests/language/factory_redirection_test.dart » ('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 // Dart test program for testing factory generic result types.
5
6 class A<T> {
7 A() { }
8 factory A.factory() {
9 return new A<String>();
10 }
11 }
12
13 class B<T> extends A<T> {
14 B() { }
15 factory B.factory() {
16 return new B<String>();
17 }
18 }
19
20
21 main() {
22 new A<String>.factory();
23 new A<int>.factory(); /// 00: dynamic type error
24 new B<String>.factory();
25 new B<int>.factory(); /// 01: dynamic type error
26 }
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/language/factory_redirection_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698