new scope and deserialization

This commit is contained in:
Michael Bogdanov
2015-08-17 14:30:42 +03:00
parent 7f2973dc7d
commit ebb1629285
6 changed files with 120 additions and 10 deletions
@@ -167,6 +167,10 @@ public class FunctionCodegen {
v.getSerializationBindings().put(IMPL_CLASS_NAME_FOR_CALLABLE, functionDescriptor, shortNameByAsmType(ownerType));
}
else {
if (owner instanceof PackageContext) {
Type ownerType = ((PackageContext) owner).getPackagePartType();
v.getSerializationBindings().put(IMPL_CLASS_NAME_FOR_CALLABLE, functionDescriptor, shortNameByAsmType(ownerType));
}
v.getSerializationBindings().put(METHOD_FOR_FUNCTION, functionDescriptor, asmMethod);
}
@@ -115,6 +115,10 @@ public class PropertyCodegen {
v.getSerializationBindings().put(IMPL_CLASS_NAME_FOR_CALLABLE, descriptor, shortNameByAsmType(ownerType));
}
else {
if (context instanceof PackageContext) {
Type ownerType = ((PackageContext) context).getPackagePartType();
v.getSerializationBindings().put(IMPL_CLASS_NAME_FOR_CALLABLE, descriptor, shortNameByAsmType(ownerType));
}
assert declaration != null : "Declaration is null for different context: " + context;
boolean hasBackingField = hasBackingField(declaration, descriptor);