JVM IR: keep original KotlinType in eraseTypeParameters
Otherwise EnhancedNullability annotation instance is lost (for some reason it's not translated to IR elements), and in the newly added test, the wrapper type in Java is confused with primitive, and this causes a platform declaration clash error. Also make IrTypeArgument.eraseTypeParameters private, since it's not used outside.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// FILE: E.java
|
||||
|
||||
public interface E {
|
||||
@org.jetbrains.annotations.NotNull
|
||||
Integer getId();
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
class EImpl : E {
|
||||
override fun getId(): Int = 314
|
||||
}
|
||||
|
||||
fun box(): String = if (EImpl().getId() == 314) "OK" else "Fail"
|
||||
Reference in New Issue
Block a user