KT-37986 Force boxing of inline class returned from function reference

KT-37998 Provide KotlinType for safe call
This commit is contained in:
Dmitry Petrov
2020-04-03 16:31:00 +03:00
parent 5ed845d0b4
commit d5ace43614
11 changed files with 131 additions and 16 deletions
+13
View File
@@ -0,0 +1,13 @@
inline class Z(val x: Int)
class A {
fun foo() = Z(42)
}
fun test(a: A?) = a?.foo()!!
fun box(): String {
val t = test(A())
if (t.x != 42) throw AssertionError("$t")
return "OK"
}