KT-11960 Fix case of instantiation of local class via its inner class or via nested lambda. Move tests to more appropriate location. Fix bug in blackbox codegen generator for JVM, which does not allow to suppress tests.

This commit is contained in:
Alexey Andreev
2016-05-23 12:17:56 +03:00
parent bb8a3aa262
commit acc5303731
9 changed files with 56 additions and 45 deletions
@@ -0,0 +1,17 @@
fun box(): String {
val capturedInConstructor = 1
data class A(var x: Int) {
var y = 0
init {
y += x + capturedInConstructor
}
}
val a = A(100).copy()
if (a.y != 101) return "fail1a: ${a.y}"
if (a.x != 100) return "fail1b: ${a.x}"
return "OK"
}