KT-423 Assertion error on incomplete code
This commit is contained in:
@@ -332,8 +332,10 @@ public class JetFlowInformationProvider {
|
|||||||
@Override
|
@Override
|
||||||
public Void visitProperty(JetProperty property, Void data) {
|
public Void visitProperty(JetProperty property, Void data) {
|
||||||
DeclarationDescriptor descriptor = trace.get(BindingContext.DECLARATION_TO_DESCRIPTOR, property);
|
DeclarationDescriptor descriptor = trace.get(BindingContext.DECLARATION_TO_DESCRIPTOR, property);
|
||||||
assert descriptor instanceof VariableDescriptor;
|
if (descriptor != null) {
|
||||||
declaredVariables.add((VariableDescriptor) descriptor);
|
assert descriptor instanceof VariableDescriptor;
|
||||||
|
declaredVariables.add((VariableDescriptor) descriptor);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,8 +344,10 @@ public class JetFlowInformationProvider {
|
|||||||
JetParameter loopParameter = expression.getLoopParameter();
|
JetParameter loopParameter = expression.getLoopParameter();
|
||||||
if (loopParameter != null) {
|
if (loopParameter != null) {
|
||||||
DeclarationDescriptor descriptor = trace.get(BindingContext.DECLARATION_TO_DESCRIPTOR, loopParameter);
|
DeclarationDescriptor descriptor = trace.get(BindingContext.DECLARATION_TO_DESCRIPTOR, loopParameter);
|
||||||
assert descriptor instanceof VariableDescriptor;
|
if (descriptor != null) {
|
||||||
declaredVariables.add((VariableDescriptor) descriptor);
|
assert descriptor instanceof VariableDescriptor;
|
||||||
|
declaredVariables.add((VariableDescriptor) descriptor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user