KT-37986 Force boxing of inline class returned from function reference
KT-37998 Provide KotlinType for safe call
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user