mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Merge pull request #2406 from erik-krogh/returnlessFp
Approved by asgerf
This commit is contained in:
@@ -6,3 +6,4 @@
|
||||
| tst.js:53:10:53:34 | bothOnl ... fects() | the $@ does not return anything, yet the return value is used. | tst.js:48:2:50:5 | functio ... )\\n } | function onlySideEffects2 |
|
||||
| tst.js:76:12:76:46 | [1,2,3] ... n, 3)}) | the $@ does not return anything, yet the return value from the call to filter is used. | tst.js:76:27:76:45 | n => {equals(n, 3)} | callback function |
|
||||
| tst.js:80:12:80:50 | filter( ... 3) } ) | the $@ does not return anything, yet the return value from the call to filter is used. | tst.js:80:28:80:48 | x => { ... x, 3) } | callback function |
|
||||
| tst.ts:6:13:6:25 | returnsVoid() | the $@ does not return anything, yet the return value is used. | tst.ts:1:1:1:38 | declare ... : void; | function returnsVoid |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="return addHandlers();">
|
||||
<object id="container" data="editor/svg-editor.html" onload="addHandlers()"></object>
|
||||
<a href="javascript:addHandlers()">Foo</a>
|
||||
<div onclick="addHandlers()">Click me</div>
|
||||
|
||||
@@ -88,4 +88,8 @@
|
||||
}
|
||||
|
||||
new Deferred().resolve(onlySideEffects()); // OK
|
||||
})();
|
||||
})();
|
||||
|
||||
+function() {
|
||||
console.log("FOO");
|
||||
}.call(this);
|
||||
@@ -0,0 +1,6 @@
|
||||
declare function returnsVoid() : void;
|
||||
declare function returnsSomething(): number;
|
||||
|
||||
console.log(returnsSomething());
|
||||
|
||||
console.log(returnsVoid()); // NOT OK!
|
||||
Reference in New Issue
Block a user