DelegateKind is not needed when generating delegates
"this.context" is correct and more useful
This commit is contained in:
@@ -1093,10 +1093,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
field.store(fieldType, iv);
|
field.store(fieldType, iv);
|
||||||
}
|
}
|
||||||
|
|
||||||
final CodegenContext delegateContext = context.intoClass(superClassDescriptor,
|
generateDelegates(superClassDescriptor, field);
|
||||||
new OwnerKind.DelegateKind(field, superTypeAsmType.getInternalName()),
|
|
||||||
state);
|
|
||||||
generateDelegates(superClassDescriptor, delegateContext, field);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lookupConstructorExpressionsInClosureIfPresent(final ConstructorContext constructorContext) {
|
private void lookupConstructorExpressionsInClosureIfPresent(final ConstructorContext constructorContext) {
|
||||||
@@ -1527,9 +1524,9 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void generateDelegates(ClassDescriptor toClass, CodegenContext delegateContext, StackValue field) {
|
protected void generateDelegates(ClassDescriptor toClass, StackValue field) {
|
||||||
final FunctionCodegen functionCodegen = new FunctionCodegen(delegateContext, v, state);
|
final FunctionCodegen functionCodegen = new FunctionCodegen(context, v, state);
|
||||||
final PropertyCodegen propertyCodegen = new PropertyCodegen(delegateContext, v, functionCodegen);
|
final PropertyCodegen propertyCodegen = new PropertyCodegen(context, v, functionCodegen);
|
||||||
|
|
||||||
for (DeclarationDescriptor declaration : descriptor.getDefaultType().getMemberScope().getAllDescriptors()) {
|
for (DeclarationDescriptor declaration : descriptor.getDefaultType().getMemberScope().getAllDescriptors()) {
|
||||||
if (declaration instanceof CallableMemberDescriptor) {
|
if (declaration instanceof CallableMemberDescriptor) {
|
||||||
|
|||||||
Reference in New Issue
Block a user