Kotlin: Add test for missing kotlin to java property mapping

This commit is contained in:
Tamas Vajk
2022-05-24 10:02:32 +02:00
parent 8248f607e4
commit 19400249a9
3 changed files with 8 additions and 0 deletions

View File

@@ -1,2 +1,5 @@
diagnostics
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.String.<get-length> in java.lang.String |
#select
| Integer | | Integer |
| Object | | Object |

View File

@@ -1 +1,3 @@
fun test(m: Map<Int, Int>) = m.getOrDefault(1, 2) fun test(m: Map<Int, Int>) = m.getOrDefault(1, 2)
fun test2(s: String) = s.length

View File

@@ -1,4 +1,7 @@
import java import java
import semmle.code.java.Diagnostics
from MethodAccess ma from MethodAccess ma
select ma.getCallee().getAParameter().getType().toString() select ma.getCallee().getAParameter().getType().toString()
query predicate diagnostics(Diagnostic d) { any() }