public bool CompatibleWith(ITypeCheckType other)
        {
            if (Equals(other) || IsChildOf(other) || other.IsChildOf(this))
            {
                return true;
            }

            return false;
        }
示例#2
0
        public bool CompatibleWith(ITypeCheckType other)
        {
            if (Equals(other) || IsChildOf(other) || other.IsChildOf(this))
            {
                return(true);
            }

            return(false);
        }
        public ITypeCheckType GetLeastUpperBound(ITypeCheckType other)
        {
            if (Equals(other) || other.IsChildOf(this))
            {
                return this;
            }
            else if (IsChildOf(other))
            {
                return other;
            }

            Debug.Assert(SuperType != null, "SuperType is null!");

            return SuperType.GetLeastUpperBound(other);
        }
示例#4
0
        public ITypeCheckType GetLeastUpperBound(ITypeCheckType other)
        {
            if (Equals(other) || other.IsChildOf(this))
            {
                return(this);
            }
            else if (IsChildOf(other))
            {
                return(other);
            }

            Debug.Assert(SuperType != null, "SuperType is null!");

            return(SuperType.GetLeastUpperBound(other));
        }