Change VARIABLE_REASSIGNMENT slice so it composes properly
This commit is contained in:
committed by
Alexander Udalov
parent
7bc0132cca
commit
f0bc021b5e
@@ -171,7 +171,7 @@ public interface BindingContext {
|
||||
|
||||
WritableSlice<ScriptDescriptor, LexicalScope> SCRIPT_SCOPE = Slices.createSimpleSlice();
|
||||
|
||||
WritableSlice<KtExpression, Boolean> VARIABLE_REASSIGNMENT = Slices.createSimpleSetSlice();
|
||||
WritableSlice<KtExpression, Boolean> VARIABLE_REASSIGNMENT = new BasicWritableSlice<>(DO_NOTHING);
|
||||
WritableSlice<ValueParameterDescriptor, Boolean> AUTO_CREATED_IT = Slices.createSimpleSetSlice();
|
||||
|
||||
WritableSlice<Pair<AnonymousFunctionDescriptor, Integer>, Boolean> SUSPEND_LAMBDA_PARAMETER_USED = Slices.createSimpleSlice();
|
||||
|
||||
@@ -140,7 +140,8 @@ public final class BindingUtils {
|
||||
}
|
||||
|
||||
public static boolean isVariableReassignment(@NotNull BindingContext context, @NotNull KtExpression expression) {
|
||||
return BindingContextUtils.getNotNull(context, BindingContext.VARIABLE_REASSIGNMENT, expression);
|
||||
Boolean result = context.get(BindingContext.VARIABLE_REASSIGNMENT, expression);
|
||||
return (result != null) ? result : false;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user