Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Check that a method reference is not an acceptable compile time constant | 4 // Check that a method reference is not an acceptable compile time constant |
| 5 | 5 // VMOptions= |
| 6 // VMOptions=--compile_all | |
|
vsm
2012/01/06 21:41:42
Is this actually used by the test script?
Ivan Posva
2012/01/06 21:45:15
staine[runtime] ../tools/test.py --verbose languag
| |
| 6 | 7 |
| 7 topMethod() { } | 8 topMethod() { } |
| 8 | 9 |
| 9 class ConstInit7NegativeTest { | 10 class ConstInit7NegativeTest { |
| 10 classMethod([var x = | 11 classMethod([var x = |
| 11 topMethod // Error: not a compile time const. | 12 topMethod // Error: not a compile time const. |
| 12 ]) {} | 13 ]) {} |
| 13 } | 14 } |
| 14 | 15 |
| 15 main() { | 16 main() { |
| 16 new ConstInit7NegativeTest(); | 17 (new ConstInit7NegativeTest()).classMethod(); |
| 17 } | 18 } |
| OLD | NEW |