Chromium Code Reviews| Index: tests/language/bad_constructor_test.dart |
| =================================================================== |
| --- tests/language/bad_constructor_test.dart (revision 27958) |
| +++ tests/language/bad_constructor_test.dart (working copy) |
| @@ -5,7 +5,7 @@ |
| class A { |
| // Constructor may not be static. |
| - static A(); /// 00: compile-time error |
| + 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
|
| // Factory may not be static. |
| static factory A() { return null; } /// 01: compile-time error |
| @@ -14,10 +14,10 @@ |
| var m; |
| A.m() { m = 0; } /// 04: compile-time error |
| - set q(var value) { m = q; } |
| - A.q(); /// 05: compile-time error |
| + set q(var value) { m = q; } // No name conflict with q=. |
| + 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.
|
| - A.foo() : m = 0; /// 06: compile-time error |
| + 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.
|
| int foo(int a, int b) => a + b * m; |
| } |