Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: tests/compiler/dart2js_extra/18383_test.dart

Issue 250553004: Always treat [call] members as closures during tracing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
}
+
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698