mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
add test for modern compound assignment in js/implicit-operand-conversion
This commit is contained in:
@@ -13,3 +13,5 @@
|
||||
| tst.js:106:5:106:7 | g() | This expression will be implicitly converted from undefined to number. |
|
||||
| tst.js:109:13:109:15 | g() | This expression will be implicitly converted from undefined to number. |
|
||||
| tst.js:110:13:110:15 | g() | This expression will be implicitly converted from undefined to string. |
|
||||
| tst.js:117:8:117:8 | y | This expression will be implicitly converted from string to number. |
|
||||
| tst.js:122:10:122:10 | y | This expression will be implicitly converted from string to number. |
|
||||
|
||||
@@ -110,3 +110,14 @@ function l() {
|
||||
var b = g() + "str";
|
||||
});
|
||||
|
||||
|
||||
function m() {
|
||||
var x = 19, y = "string";
|
||||
|
||||
x %= y; // NOT OK
|
||||
x += y; // OK
|
||||
x ||= y; // OK
|
||||
x &&= y; // OK
|
||||
x ??= y; // OK
|
||||
x >>>= y; // NOT OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user