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

Side by Side Diff: tests/language_strong/constructor_redirect2_test.dart

Issue 2765893003: Fix warnings_checker.dart handling of 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 // Redirection constructors must not have a function body. 4 // Redirection constructors must not have a function body.
5 5
6 class A { 6 class A {
7 var x; 7 var x;
8 A(this.x) {} 8 A(this.x) {}
9 9
10 // Redirecting constructor must not have a function body. 10 // Redirecting constructor must not have a function body.
11 A.illegalBody(x) : this(3) {} // /// 01: compile-time error 11 A.illegalBody(x) : this(3) {} // //# 01: compile-time error
12 12
13 // Redirecting constructor must not initialize any fields. 13 // Redirecting constructor must not initialize any fields.
14 A.illegalInit() : this(3), x = 5; // /// 02: compile-time error 14 A.illegalInit() : this(3), x = 5; // //# 02: compile-time error
15 15
16 // Redirecting constructor must not have initializing formal parameters. 16 // Redirecting constructor must not have initializing formal parameters.
17 A.illegalFormal(this.x) : this(3); // /// 03: compile-time error 17 A.illegalFormal(this.x) : this(3); // //# 03: compile-time error
18 18
19 // Redirection constructors must not call super constructor. 19 // Redirection constructors must not call super constructor.
20 A.illegalSuper() : this(3), super(3); // /// 04: compile-time error 20 A.illegalSuper() : this(3), super(3); // //# 04: compile-time error
21 } 21 }
22 22
23 main() { 23 main() {
24 new A(3); 24 new A(3);
25 new A.illegalBody(10); // /// 01: continued 25 new A.illegalBody(10); // //# 01: continued
26 new A.illegalInit(10); // /// 02: continued 26 new A.illegalInit(10); // //# 02: continued
27 new A.illegalFormal(10); // /// 03: continued 27 new A.illegalFormal(10); // //# 03: continued
28 new A.illegalSuper(10); // /// 04: continued 28 new A.illegalSuper(10); // //# 04: continued
29 } 29 }
OLDNEW
« no previous file with comments | « tests/language_strong/constructor_named_arguments_test.dart ('k') | tests/language_strong/constructor_redirect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698