add test for modern compound assignment in js/implicit-operand-conversion

This commit is contained in:
Erik Krogh Kristensen
2020-10-20 10:50:20 +02:00
parent eb786078cb
commit 7d87699e42
2 changed files with 13 additions and 0 deletions

View File

@@ -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. |

View File

@@ -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
}