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

Unified Diff: tests/compiler/dart2js_extra/closure_test.dart

Issue 437193002: Remove function names on function expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove TODO Created 6 years, 4 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 | « tests/compiler/dart2js_extra/closure_capture_test.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/closure_test.dart
diff --git a/tests/compiler/dart2js_extra/closure_test.dart b/tests/compiler/dart2js_extra/closure_test.dart
index fad942f3270aad6706c41749723c05853de206d3..b0bdeec5f64c2de36ccf796f2b60b332ae4a5ef9 100644
--- a/tests/compiler/dart2js_extra/closure_test.dart
+++ b/tests/compiler/dart2js_extra/closure_test.dart
@@ -5,14 +5,13 @@
import "package:expect/expect.dart";
closure0() {
- // TODO(floitsch): remove name from functions.
- var f = fun() { return 499; };
+ var f = () { return 499; };
Expect.equals(499, f());
}
class A {
closure1() {
- var f = fun() { return 499; };
+ var f = () { return 499; };
Expect.equals(499, f());
}
}
@@ -22,11 +21,11 @@ applyFun(f) {
}
closure2() {
- Expect.equals(499, applyFun(fun() { return 499; }));
+ Expect.equals(499, applyFun(() { return 499; }));
}
closure3() {
- var f = fun(x) { return 400 + x; };
+ var f = (x) { return 400 + x; };
Expect.equals(499, f(99));
}
@@ -35,7 +34,7 @@ applyFun2(f) {
}
closure4() {
- Expect.equals(499, applyFun2(fun(x, y) { return x + y; }));
+ Expect.equals(499, applyFun2((x, y) { return x + y; }));
}
main() {
« no previous file with comments | « tests/compiler/dart2js_extra/closure_capture_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698