process code with implicit return statement (#1522)
Bookmarklet for instance implicitedly assumes a "completion value" without using `return`. The `expression` option now supports such use cases. Optimisations on IIFEs also enhanced. fixes #354 fixes #543 fixes #625 fixes #628 fixes #640 closes #1293
This commit is contained in:
@@ -640,9 +640,7 @@ call_args: {
|
||||
expect: {
|
||||
const a = 1;
|
||||
console.log(1);
|
||||
+function(a) {
|
||||
return 1;
|
||||
}(1);
|
||||
+(1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -663,9 +661,7 @@ call_args_drop_param: {
|
||||
expect: {
|
||||
const a = 1;
|
||||
console.log(1);
|
||||
+function() {
|
||||
return 1;
|
||||
}(b);
|
||||
+(b, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user