Files
Monkey-Test/WebDriverAgent/Inspector/node_modules/defs/tests/named-function-expression-conservative-error.js
T
2019-01-25 17:01:52 +08:00

13 lines
364 B
JavaScript

"use strict";
const fn1 = function f(a) {
// not allowed and defs produces an error accordingly
const a = 3;
}
const fn2 = function f(a) {
// defs produces an error but it's a false positive
// (it's allowed per the ES spec). Being conservative
// is a good thing here because the usage is unnecessary
// and error-prone
const f = 3;
}