예제 #1
0
        public bool IsMyBase(int type)
        {
            if ((int)PrimitiveType.InvalidType == type)
                return false;

            if (Base != Constants.kInvalidIndex)
            {
                if (type == Base)
                    return true;

                ClassNode baseClassNode = TypeSystem.classTable.ClassNodes[Base];
                if (baseClassNode.IsMyBase(type))
                    return true;
            }

            return false;
        }
예제 #2
0
        public bool IsMyBase(int type)
        {
            if ((int)PrimitiveType.kInvalidType == type)
            {
                return(false);
            }

            foreach (int baseIndex in baseList)
            {
                Validity.Assert(baseIndex != (int)PrimitiveType.kInvalidType);
                if (type == baseIndex)
                {
                    return(true);
                }

                ClassNode baseClassNode = typeSystem.classTable.ClassNodes[baseIndex];
                if (baseClassNode.IsMyBase(type))
                {
                    return(true);
                }
            }

            return(false);
        }