Files
codeql/javascript/ql/test/query-tests/LanguageFeatures/SpuriousArguments/globals.js
2018-08-02 17:53:23 +01:00

15 lines
278 B
JavaScript

function global() {}
(function(window) {
window.global = function (x) {};
})(this);
global(x); // OK: might refer to function on line 4
function otherglobal() {}
var o = {
otherglobal: function (x) {}
};
otherglobal(x); // NOT OK: can never refer to function on line 12