src/NFun/Tic/GraphBuilder.cs
/// <summary>
/// Set function call, with function signature
/// </summary>
Set function call, with function signature
Set function call with function signature
public void SetCall(ITicNodeState[] argThenReturnTypes, int[] argThenReturnIds) {
        Debug.Assert(argThenReturnTypes.Length == argThenReturnIds.Length);
        for (int i = 0; i < argThenReturnIds.Length - 1; i++)
            SetCallArgument(argThenReturnTypes[i], argThenReturnIds[i]);
        var returnType = argThenReturnTypes[argThenReturnIds.Length - 1];
        var returnId = argThenReturnIds[^1];
        var returnNode = GetOrCreateNode(returnId);
        returnNode.State = SolvingFunctions.GetMergedStateOrNull(returnNode.State, returnType) ??
                           throw TicErrors.CannotSetState(returnNode, returnType);
    }
public void SetCall ( ITicNodeState [ ] argThenReturnTypes , int [ ] argThenReturnIds ) { Debug . Assert ( argThenReturnTypes . Length == argThenReturnIds . Length ) ; for ( int i = 0 ; i < argThenReturnIds . Length - 1 ; i ++ ) SetCallArgument ( argThenReturnTypes [ i ] , argThenReturnIds [ i ] ) ; var returnType = argThenReturnTypes [ argThenReturnIds . Length - 1 ] ; var returnId = argThenReturnIds [ ^ 1 ] ; var returnNode = GetOrCreateNode ( returnId ) ; returnNode . State = SolvingFunctions . GetMergedStateOrNull ( returnNode . State , returnType ) ?? throw TicErrors . CannotSetState ( returnNode , returnType ) ; }
Set function call, with function signature
Set function call with function signature
argThenReturnTypes
ITicNodeState[]
argThenReturnIds
int[]