mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
34 lines
671 B
JavaScript
34 lines
671 B
JavaScript
(function (x) {
|
|
var y = x;
|
|
})(42);
|
|
|
|
(function (x) {
|
|
each(arguments, console.log); // `arguments` escapes
|
|
var y = x;
|
|
})(42);
|
|
|
|
(function (x) {
|
|
'use strict';
|
|
each(arguments, console.log);
|
|
var y = x;
|
|
})(42);
|
|
|
|
(function (x, i) {
|
|
arguments[i] = 'hi'; // possible mutation of `x` through `arguments`
|
|
var y = x;
|
|
})(42);
|
|
|
|
|
|
(function (x, i) {
|
|
arguments.length = 0;
|
|
var y = x;
|
|
// we currently infer an indefinite value for `x`, since
|
|
// our analysis for IIFE parameters bails if there is a use
|
|
// of `arguments` of a non-strict IIFE
|
|
})(42);
|
|
|
|
(function (x, i) {
|
|
console.log(arguments[i]);
|
|
var y = x; // see above: conservative handling of IIFEs
|
|
})(42);
|