JS: be conservative in presence of NaN comments

This commit is contained in:
Asger F
2018-10-23 15:36:41 +01:00
parent feb8a8c4fd
commit 43df9538bf
2 changed files with 32 additions and 1 deletions

View File

@@ -50,3 +50,15 @@ function h(x, y) {
if (x > y) {} // NOT OK - always true
}
}
function nan(x) {
// This is a NaN comment.
if (x - 1 < x) {} // OK
}
/**
* This is a NAN comment.
*/
function nan2(x) {
if (x - 1 < x) {} // OK
}