| Index: tests/language/function_type_this_parameter_test.dart
|
| diff --git a/tests/language/compile_time_constant9_test.dart b/tests/language/function_type_this_parameter_test.dart
|
| similarity index 56%
|
| copy from tests/language/compile_time_constant9_test.dart
|
| copy to tests/language/function_type_this_parameter_test.dart
|
| index a149c43f11c1b94efb802fbad0ac84b423695504..cb7d6c5355adc345a401ee57d36d240bedc06a01 100644
|
| --- a/tests/language/compile_time_constant9_test.dart
|
| +++ b/tests/language/function_type_this_parameter_test.dart
|
| @@ -1,16 +1,15 @@
|
| // Copyright (c) 2012, 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.
|
| -
|
| -class B {
|
| - const B();
|
| -}
|
| +// Check that function types are accepted for constructor arguments that
|
| +// initialize fields.
|
|
|
| class A {
|
| - var x = const B();
|
| - A();
|
| + Function f;
|
| + A(int this.f());
|
| }
|
|
|
| main() {
|
| - Expect.isTrue(new A().x === new A().x);
|
| + var a = new A(() => 499);
|
| + Expect.equals(499, (a.f)());
|
| }
|
|
|