Chromium Code Reviews| Index: tests/language/src/FunctionFieldTest.dart |
| diff --git a/tests/language/src/FunctionFieldTest.dart b/tests/language/src/FunctionFieldTest.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8c44b173cb8719019983a114501158074ceac9ba |
| --- /dev/null |
| +++ b/tests/language/src/FunctionFieldTest.dart |
| @@ -0,0 +1,16 @@ |
| +// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| +// VMOptions=--fatal-type-errors --enable_type_checks |
|
regis
2012/02/23 19:42:09
The VM does not support --fatal-type-errors.
zundel
2012/02/24 15:38:57
VMOptions is kind of a misnomer in that they are j
|
| +// |
| +// Test of calling Function, which is field of some class. |
| + |
| +class Wrapper { |
| + Function f; |
| +} |
| + |
| +main() { |
| + Wrapper w = new Wrapper(); |
| + w.f = () {return 42;}; |
| + Expect.equals(42, w.f()); |
| +} |