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

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

Issue 2774783002: Re-land "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 4
5 class A { 5 class A {
6 // Constructor may not be static. 6 // Constructor may not be static.
7 static A(); // //# 00: compile-time error 7 static A(); // //# 00: compile-time error
8 8
9 // Factory may not be static. 9 // Factory may not be static.
10 static factory A() { return null; } // //# 01: compile-time error 10 static factory A() { return null; } // //# 01: compile-time error
11 11
12 // Named constructor may not conflict with names of methods and fields. 12 // Named constructor may not conflict with names of methods and fields.
13 var m; 13 var m;
14 A.m() { m = 0; } // //# 04: compile-time error 14 A.m() { m = 0; } // //# 04: compile-time error
15 15
16 set q(var value) { m = 0; } // No name conflict with q=. 16 set q(var value) {
17 m = 0;
18 } // No name conflict with q=.
17 A.q(); // //# 05: ok 19 A.q(); // //# 05: ok
18 A(); // //# 05: ok 20 A(); // //# 05: ok
19 21
20 A.foo() : m = 0; // //# 06: compile-time error 22 A.foo() : m = 0; // //# 06: compile-time error
21 int foo(int a, int b) => a + b * m; 23 int foo(int a, int b) => a + b * m;
22 } 24 }
23 25
24 main() { 26 main() {
25 new A(); 27 new A();
26 } 28 }
OLDNEW
« no previous file with comments | « tests/language/async_throw_in_catch_test.dart ('k') | tests/language/bad_named_parameters2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698