summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrow-functions/const-1.js
blob: f8e7fce4c2d01e8d715217b7e29923e1f1e4f8bc (plain)
1
2
3
4
5
6
7
8
9
10
11
// Arguments with default parameters can shadow const locals.

"use strict";

function f() {
    const x = 1;
    return (x = 0) => x;
}

var g = f();
assertEq(g(), 0);