KT-27706: Dispatch receiver type for constructor accessor is Object

This commit is contained in:
Dmitry Petrov
2018-10-19 17:08:49 +03:00
parent ea4afdaebe
commit ac7cc0c08e
7 changed files with 45 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
inline class Z(val x: Int) {
inner class Inner(val z: Z) {
val xx = x
}
}
fun box(): String {
val zi = Z(42).Inner(Z(100))
if (zi.xx != 42) throw AssertionError()
if (zi.z.x != 100) throw AssertionError()
return "OK"
}