refactoring
This commit is contained in:
@@ -776,10 +776,11 @@ public class JetTypeMapper extends BindingTraceAware {
|
|||||||
|
|
||||||
if (closure != null) {
|
if (closure != null) {
|
||||||
for (Map.Entry<DeclarationDescriptor, EnclosedValueDescriptor> entry : closure.getCaptureVariables().entrySet()) {
|
for (Map.Entry<DeclarationDescriptor, EnclosedValueDescriptor> entry : closure.getCaptureVariables().entrySet()) {
|
||||||
if (entry.getKey() instanceof VariableDescriptor && !(entry.getKey() instanceof PropertyDescriptor)) {
|
DeclarationDescriptor variableDescriptor = entry.getKey();
|
||||||
Type sharedVarType = getSharedVarType(entry.getKey());
|
if (variableDescriptor instanceof VariableDescriptor && !(variableDescriptor instanceof PropertyDescriptor)) {
|
||||||
|
Type sharedVarType = getSharedVarType(variableDescriptor);
|
||||||
if (sharedVarType == null) {
|
if (sharedVarType == null) {
|
||||||
sharedVarType = mapType(((VariableDescriptor) entry.getKey()).getType());
|
sharedVarType = mapType(((VariableDescriptor) variableDescriptor).getType());
|
||||||
}
|
}
|
||||||
signatureWriter.writeParameterType(JvmMethodParameterKind.SHARED_VAR);
|
signatureWriter.writeParameterType(JvmMethodParameterKind.SHARED_VAR);
|
||||||
signatureWriter.writeAsmType(sharedVarType, false);
|
signatureWriter.writeAsmType(sharedVarType, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user