Replace Map and similar functions with their Java cousins

This didn't appear to be necessary because the Kotlin and Java versions of Map (for example) are designed to be compatible, but in certain cases their functions have the same erasure but not the same type (e.g. Map.getOrDefault(K, V) vs. Map.getOrDefault(Object, V).

These have different erasures which was leading to callable-binding inconsistencies.
This commit is contained in:
Chris Smowton
2022-04-19 15:15:06 +01:00
parent fa0bd0366c
commit ce87a89009
3 changed files with 26 additions and 2 deletions

View File

@@ -0,0 +1 @@
fun test(m: Map<Int, Int>) = m.getOrDefault(1, 2)

View File

@@ -0,0 +1,4 @@
import java
from MethodAccess ma
select ma.getCallee().getAParameter().getType().toString()