Merge pull request #11302 from tamasvajk/kotlin-ignored-return

Kotlin: Exclude .kt files from ignored return value query
This commit is contained in:
Tamás Vajk
2022-11-16 16:23:58 +01:00
committed by GitHub
4 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1 @@
Likely Bugs/Statements/ReturnValueIgnored.ql

View File

@@ -0,0 +1,16 @@
class Foo {
fun foo(): Int { return 5 }
fun bar() {
val x0 = foo()
val x1 = foo()
val x2 = foo()
val x3 = foo()
val x4 = foo()
val x5 = foo()
val x6 = foo()
val x7 = foo()
val x8 = foo()
val x9 = foo()
val x = if (true) { foo() } else 6
}
}