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

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

Issue 2768073002: Format all multitests (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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 // Dart test program for testing factory generic result types. 4 // Dart test program for testing factory generic result types.
5 5
6 class A<T> { 6 class A<T> {
7 A() { } 7 A() {}
8 factory A.factory() { 8 factory A.factory() {
9 return new A<String>(); 9 return new A<String>();
10 } 10 }
11 } 11 }
12 12
13 class B<T> extends A<T> { 13 class B<T> extends A<T> {
14 B() { } 14 B() {}
15 factory B.factory() { 15 factory B.factory() {
16 return new B<String>(); 16 return new B<String>();
17 } 17 }
18 } 18 }
19 19
20
21 main() { 20 main() {
22 new A<String>.factory(); 21 new A<String>.factory();
23 new A<int>.factory(); // //# 00: dynamic type error 22 new A<int>.factory(); // //# 00: dynamic type error
24 new B<String>.factory(); 23 new B<String>.factory();
25 new B<int>.factory(); // //# 01: dynamic type error 24 new B<int>.factory(); // //# 01: dynamic type error
26 } 25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698