[NI] Fix substitution of NotNullTypeParameter

This commit is contained in:
Mikhail Zarechenskiy
2018-01-19 14:53:49 +03:00
parent 4cd07f59a0
commit 2a0bb68e1c
7 changed files with 57 additions and 30 deletions
@@ -0,0 +1,20 @@
// FILE: JClass.java
import org.jetbrains.annotations.NotNull;
public class JClass {
@NotNull
public static <T> T getNotNullT() {
return null;
}
}
// FILE: test.kt
fun <T : Any> test() {
var value: T? = null
if (value == null) {
value = JClass.getNotNullT()
}
<!DEBUG_INFO_SMARTCAST!>value<!>.hashCode() // unsafe call error
}
@@ -0,0 +1,13 @@
package
public fun </*0*/ T : kotlin.Any> test(): kotlin.Unit
public open class JClass {
public constructor JClass()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
// Static members
@org.jetbrains.annotations.NotNull public open fun </*0*/ T : kotlin.Any!> getNotNullT(): T
}