Search in sources :

Example 16 with DataFlowInfo

use of org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo in project kotlin by JetBrains.

the class DataFlowInfoForArgumentsImpl method updateInfo.

@Override
public void updateInfo(@NotNull ValueArgument valueArgument, @NotNull DataFlowInfo dataFlowInfo) {
    ValueArgument next = nextArgument == null ? null : nextArgument.get(valueArgument);
    if (next != null) {
        if (infoMap == null) {
            infoMap = new HashMap<ValueArgument, DataFlowInfo>();
        }
        infoMap.put(next, dataFlowInfo);
        return;
    }
    //TODO assert resultInfo == null
    resultInfo = dataFlowInfo;
}
Also used : ValueArgument(org.jetbrains.kotlin.psi.ValueArgument) DataFlowInfo(org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo)

Aggregations

DataFlowInfo (org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowInfo)16 DataFlowValue (org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowValue)6 NotNull (org.jetbrains.annotations.NotNull)5 ResolvedCall (org.jetbrains.kotlin.resolve.calls.model.ResolvedCall)4 LexicalWritableScope (org.jetbrains.kotlin.resolve.scopes.LexicalWritableScope)4 DataFlowValueFactory.createDataFlowValue (org.jetbrains.kotlin.resolve.calls.smartcasts.DataFlowValueFactory.createDataFlowValue)3 KotlinType (org.jetbrains.kotlin.types.KotlinType)3 ExpressionReceiver (org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver)2 PsiElement (com.intellij.psi.PsiElement)1 IElementType (com.intellij.psi.tree.IElementType)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Function1 (kotlin.jvm.functions.Function1)1 SyntheticFieldDescriptor (org.jetbrains.kotlin.descriptors.impl.SyntheticFieldDescriptor)1 ValueArgument (org.jetbrains.kotlin.psi.ValueArgument)1 BindingContext (org.jetbrains.kotlin.resolve.BindingContext)1 CallPosition (org.jetbrains.kotlin.resolve.calls.context.CallPosition)1 MutableDataFlowInfoForArguments (org.jetbrains.kotlin.resolve.calls.model.MutableDataFlowInfoForArguments)1 LexicalScope (org.jetbrains.kotlin.resolve.scopes.LexicalScope)1 ControlStructureTypingUtils.createDataFlowInfoForArgumentsForIfCall (org.jetbrains.kotlin.types.expressions.ControlStructureTypingUtils.createDataFlowInfoForArgumentsForIfCall)1