Skip to content

Commit e5d7868

Browse files
committed
Kotlin: Add test for NullMaybe query
1 parent 39fd1b4 commit e5d7868

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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 |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Likely Bugs/Nullness/NullMaybe.ql
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fun fn(b: Boolean) {
2+
var d: Double? = null
3+
if (b) {
4+
d = 1.0
5+
}
6+
println(d!!)
7+
}

0 commit comments

Comments
 (0)