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

For most cases it means that descendant type will be used
Try to infer most CONCRETE type if is possible Return self otherwise For most cases it means that descendant type will be used
public ITicNodeState SolveContravariant() {
        if (Preferred != null && Fits(Preferred))
            return Preferred;
        if (!HasDescendant)
            return this;
        if (IsComparable)
        {
            if (Descendant is not StatePrimitive { IsComparable: true })
                return this;
        }
        return Descendant;
    }
public ITicNodeState SolveContravariant ( ) { if ( Preferred != null && Fits ( Preferred ) ) return Preferred ; if ( ! HasDescendant ) return this ; if ( IsComparable ) { if ( Descendant is not StatePrimitive { IsComparable : true } ) return this ; } return Descendant ; }
Try to infer most CONCRETE type if is possible
Return self otherwise
Try to infer most CONCRETE type if is possible Return self otherwise
//todo //char[] is comparable!