src/NFun/Tic/SolvingStates/ConstrainsState.cs
/// <summary>
/// Try to infer most generic type if is possible
/// Return self otherwise
///
/// For most cases it means that ancestor type will be used
/// </summary>
Try to infer most generic type if is possible
Return self otherwise

For most cases it means that ancestor type will be used
Try to infer most generic type if is possible Return self otherwise For most cases it means that ancestor type will be used
public ITicNodeState SolveCovariant() {
        if (Preferred != null && Fits(Preferred))
            return Preferred;
        var ancestor = Ancestor ?? StatePrimitive.Any;
        if (IsComparable)
        {
            if (ancestor.IsComparable)
                return ancestor;
            else
                return this;
        }
        if (Descendant is StateArray)
            return Descendant;
        return ancestor;
    }
public ITicNodeState SolveCovariant ( ) { if ( Preferred != null && Fits ( Preferred ) ) return Preferred ; var ancestor = Ancestor ?? StatePrimitive . Any ; if ( IsComparable ) { if ( ancestor . IsComparable ) return ancestor ; else return this ; } if ( Descendant is StateArray ) return Descendant ; return ancestor ; }
Try to infer most generic type if is possible
Return self otherwise
Try to infer most generic type if is possible Return self otherwise