Fix coercion for stack value property in case of inline classes

#KT-25771 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-08-06 10:15:20 +03:00
parent f89803fe8f
commit 55e7def3c1
8 changed files with 114 additions and 3 deletions
@@ -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"
}