KT-1846 proper visibility for constructor parameters properties

This commit is contained in:
Alex Tkachman
2012-08-04 20:13:48 +03:00
parent 0ecb02cc25
commit c4ff8ae452
3 changed files with 33 additions and 4 deletions
@@ -232,6 +232,27 @@ public class PropertyGenTest extends CodegenTestCase {
blackBoxFile("regressions/kt2331.kt");
}
public void testKt1846() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadFile("regressions/kt1846.kt");
final Class aClass = loadImplementationClass(generateClassesInFile(), "A");
try {
Method v1 = aClass.getMethod("getV1");
System.out.println(generateToText());
fail();
}
catch (NoSuchMethodException e) {
try {
Method v1 = aClass.getMethod("setV1");
System.out.println(generateToText());
fail();
}
catch (NoSuchMethodException ee) {
//
}
}
}
public void testKt1482_2279() throws Exception {
createEnvironmentWithFullJdk();
blackBoxFile("regressions/kt1482_2279.kt");