diff --git a/compiler/testData/codegen/regressions/kt1170.kt b/compiler/testData/codegen/regressions/kt1170.kt new file mode 100644 index 00000000000..aa003bd2a2d --- /dev/null +++ b/compiler/testData/codegen/regressions/kt1170.kt @@ -0,0 +1,16 @@ +public abstract class BaseClass() { + protected open val kind : String = "BaseClass " + + fun getKindValue() : String { + return kind + } +} + +public class Subclass : BaseClass() { + override val kind : String = "Subclass " +} + +fun box(): String { + val r = Subclass().getKindValue() + Subclass().kind + return if(r == "Subclass Subclass ") "OK" else "fail" +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java index 65144a3f477..9cd14366834 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PropertyGenTest.java @@ -172,4 +172,8 @@ public class PropertyGenTest extends CodegenTestCase { public void testKt1168() throws Exception { blackBoxFile("regressions/kt1168.kt"); } + + public void testKt1170() throws Exception { + blackBoxFile("regressions/kt1170.kt"); + } }