Kotlin: Add test for NullMaybe query

This commit is contained in:
Tamas Vajk
2022-05-13 13:41:25 +02:00
parent 39fd1b48fc
commit e5d78687aa
3 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1 @@
| Test.kt:6:13:6:13 | d | Variable $@ may be null here because of $@ assignment. | Test.kt:2:5:2:25 | Double d | d | Test.kt:2:5:2:25 | d | this |

View File

@@ -0,0 +1 @@
Likely Bugs/Nullness/NullMaybe.ql

View File

@@ -0,0 +1,7 @@
fun fn(b: Boolean) {
var d: Double? = null
if (b) {
d = 1.0
}
println(d!!)
}