Fix coercion for stack value property in case of inline classes
#KT-25771 Fixed
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Foo(val s: Any) {
|
||||
fun isString(): Boolean = s is String
|
||||
}
|
||||
|
||||
class Box<T>(val x: T)
|
||||
|
||||
fun box(): String {
|
||||
val f = Foo("string")
|
||||
val g = Box(f)
|
||||
val r = g.x.isString()
|
||||
|
||||
if (!r) return "Fail"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user