Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dbfd0ae

Browse files
committed
JS: InconsistentNew regression test
1 parent bdc409c commit dbfd0ae

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
| arraydef.js:1:1:1:19 | function Array() {} | Function Array is sometimes invoked as a constructor (for example $@), and sometimes as a normal function (for example $@). | arraycalls.js:2:1:2:13 | new Array(45) | here | arraycalls.js:1:1:1:9 | Array(45) | here |
12
| m.js:1:8:1:22 | functio ... = x;\\n} | Function A is sometimes invoked as a constructor (for example $@), and sometimes as a normal function (for example $@). | c1.js:2:1:2:9 | new A(42) | here | c2.js:2:1:2:5 | A(23) | here |
23
| tst.js:1:1:1:22 | functio ... = y;\\n} | Function Point is sometimes invoked as a constructor (for example $@), and sometimes as a normal function (for example $@). | tst.js:6:1:6:17 | new Point(23, 42) | here | tst.js:7:1:7:13 | Point(56, 72) | here |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Array(45); // OK
2+
new Array(45); // OK
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
function Array() {}
2+
Array.prototype.foo = function() {};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
function Error() {}
2+
Error.prototype.toString = function() {};
3+
24
function String() {}
5+
String.prototype.toString = function() {};
6+
7+
function Array() {}
8+
Array.prototype.toString = function() {};
39

410
//semmle-extractor-options: --externs

0 commit comments

Comments
 (0)