Wrong instruction for invoke private function

#KT-2202 Fixed
This commit is contained in:
Natalia.Ukhorskaya
2012-11-02 11:49:10 +04:00
parent a9c567d19b
commit 91e83c2860
12 changed files with 191 additions and 50 deletions
@@ -549,4 +549,8 @@ public class NamespaceGenTest extends CodegenTestCase {
public void testPrivateTopLevelPropAndVarInInner() {
blackBoxFile("privateTopLevelPropAndVarInInner.kt");
}
public void testInvokeSpecial() {
blackBoxFile("invokespecial.kt");
}
}
@@ -376,4 +376,12 @@ public class PropertyGenTest extends CodegenTestCase {
blackBoxFile("properties/accessToPrivateSetter.kt");
}
public void testKt2202() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadFile("properties/kt2202.kt");
String text = generateToText();
assertFalse(text.contains("INVOKEVIRTUAL"));
assertTrue(text.contains("INVOKESPECIAL"));
}
}