[es6.tailCall] Add default-parameters-black-es6-block-scoping test case

refer: https://github.com/babel/babel/issues/2401
This commit is contained in:
Jhen 2015-09-26 13:16:34 +08:00
parent 441f5a14f6
commit 67efa9ee4a
3 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,6 @@
function sum(a=1, b=2) {
if (b > 0) {
return sum(a + 1, b - 1);
}
return a;
}

View File

@ -0,0 +1,20 @@
"use strict";
function sum() {
var _arguments = arguments;
var _again = true;
_function: while (_again) {
let a = _arguments.length <= 0 || _arguments[0] === undefined ? 1 : _arguments[0];
_again = false;
let b = _arguments.length <= 1 || _arguments[1] === undefined ? 2 : _arguments[1];
if (b > 0) {
_arguments = [a + 1, b - 1];
_again = true;
a = b = undefined;
continue _function;
}
return a;
}
}

View File

@ -0,0 +1,3 @@
{
"blacklist": ["es6.blockScoping"]
}