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

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

Issue 24789003: Fix test failure expectations and update status files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
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 // VMOptions=--constructor_name_check 4 // VMOptions=--constructor_name_check
5 5
6 class A { 6 class A {
7 // Constructor may not be static. 7 // Constructor may not be static.
8 static A(); /// 00: compile-time error 8 static A() { } /// 00: compile-time error
hausner 2013/09/26 21:36:05 Why the change to { }?
regis 2013/09/26 22:12:26 Already replied to Ivan. Anyway, reverted here and
9 9
10 // Factory may not be static. 10 // Factory may not be static.
11 static factory A() { return null; } /// 01: compile-time error 11 static factory A() { return null; } /// 01: compile-time error
12 12
13 // Named constructor may not conflict with names of methods and fields. 13 // Named constructor may not conflict with names of methods and fields.
14 var m; 14 var m;
15 A.m() { m = 0; } /// 04: compile-time error 15 A.m() { m = 0; } /// 04: compile-time error
16 16
17 set q(var value) { m = q; } 17 set q(var value) { m = q; } // No name conflict with q=.
18 A.q(); /// 05: compile-time error 18 A.q() { } /// 05: runtime error
hausner 2013/09/26 21:36:05 Why is this a runtime error? Can you add a comment
regis 2013/09/26 22:12:26 Done.
19 19
20 A.foo() : m = 0; /// 06: compile-time error 20 A.foo() : m = 0 { } /// 06: compile-time error
hausner 2013/09/26 21:36:05 Why the change to empty body? A semicolon means em
regis 2013/09/26 22:12:26 Done.
21 int foo(int a, int b) => a + b * m; 21 int foo(int a, int b) => a + b * m;
22 } 22 }
23 23
24 main() { 24 main() {
25 new A(); 25 new A();
26 } 26 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/getter_no_setter_test.dart » ('j') | tests/lib/mirrors/library_metadata2_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698