| Index: tests/compiler/dart2js_extra/18383_test.dart
|
| diff --git a/tests/language/type_check_const_function_typedef_test.dart b/tests/compiler/dart2js_extra/18383_test.dart
|
| similarity index 51%
|
| copy from tests/language/type_check_const_function_typedef_test.dart
|
| copy to tests/compiler/dart2js_extra/18383_test.dart
|
| index 484c61aeef1a2f3230d5e97c1e6af609b5bac1b0..16591295fc1c625072ab9de59ff0898b7605fecc 100644
|
| --- a/tests/language/type_check_const_function_typedef_test.dart
|
| +++ b/tests/compiler/dart2js_extra/18383_test.dart
|
| @@ -2,21 +2,24 @@
|
| // 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.
|
|
|
| -// Tests that typechecks on const objects with typedefs work.
|
| +// Regression test for http://dartbug.com/18383
|
|
|
| import "package:expect/expect.dart";
|
|
|
| -typedef String Int2String(int x);
|
| -
|
| -class A {
|
| - final Int2String f;
|
| - const A(this.f);
|
| +class F {
|
| + call() => (x) => new G(x.toInt());
|
| }
|
|
|
| -String foo(int x) => "str";
|
| -
|
| -const a = const A(foo);
|
| +class G {
|
| + var z;
|
| + G(this.z);
|
| + foo() => '$this.foo';
|
| + toString() => 'G($z)';
|
| +}
|
|
|
| main() {
|
| - Expect.equals("str", a.f(499));
|
| + var f = new F();
|
| + var m = f();
|
| + Expect.equals(m(66).foo(), "G(66).foo");
|
| }
|
| +
|
|
|