KT-1165 right type for default property setter

This commit is contained in:
Alex Tkachman
2012-01-27 23:59:59 +03:00
parent 686d4cae3c
commit c83d70b856
3 changed files with 21 additions and 3 deletions
@@ -729,6 +729,7 @@ public class DescriptorResolver {
} }
else { else {
getterDescriptor = createDefaultGetter(propertyDescriptor); getterDescriptor = createDefaultGetter(propertyDescriptor);
getterDescriptor.initialize(propertyDescriptor.getOutType());
} }
return getterDescriptor; return getterDescriptor;
} }
@@ -0,0 +1,13 @@
public abstract class VirtualFile() {
public abstract val size : Long
}
public class PhysicalVirtualFile : VirtualFile() {
public override val size: Long
get() = 11
}
fun box() : String {
PhysicalVirtualFile()
return "OK"
}
@@ -254,15 +254,19 @@ public class ClassGenTest extends CodegenTestCase {
blackBoxFile("classes/selfcreate.kt"); blackBoxFile("classes/selfcreate.kt");
} }
public void testkt1134() throws Exception { public void testKt1134() throws Exception {
blackBoxFile("regressions/kt1134.kt"); blackBoxFile("regressions/kt1134.kt");
} }
public void testkt1157() throws Exception { public void testKt1157() throws Exception {
blackBoxFile("regressions/kt1157.kt"); blackBoxFile("regressions/kt1157.kt");
} }
public void testkt471() throws Exception { public void testKt471() throws Exception {
blackBoxFile("regressions/kt471.kt"); blackBoxFile("regressions/kt471.kt");
} }
public void testKt1165() throws Exception {
blackBoxFile("regressions/kt1165.kt");
}
} }