Index: test/mjsunit/harmony/default-parameters-lazy.js |
diff --git a/test/mjsunit/harmony/default-parameters-lazy.js b/test/mjsunit/harmony/default-parameters-lazy.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cabd4525f92d3f163b056460d1ddafb7dcedfb62 |
--- /dev/null |
+++ b/test/mjsunit/harmony/default-parameters-lazy.js |
@@ -0,0 +1,69 @@ |
+// Copyright 2015 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Flags: --harmony-default-parameters --harmony-arrow-functions |
+ |
+var i = 0; |
+function f(handler = function(b) { return b + "#" + (++i); }, b = "red") { |
+/* ............................................................................ |
arv (Not doing code reviews)
2015/05/26 19:13:26
I think there is a command line option that allows
caitp (gmail)
2015/05/26 19:36:29
It looks like you can disable lazy parsing/compila
|
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ * ............................................................................ |
+ */ |
+ return handler(b); |
+} |
+ |
+assertEquals([ |
+ "blue#1", |
+ "red#2", |
+ "red", |
+ "yellow#3" |
+], [ |
+ f(undefined, "blue"), |
+ f(), |
+ f(function(b) { return b; }), |
+ f(undefined, "yellow") |
+]); |