Ejemplo n.º 1
0
        protected DataType(Source src, Namescope parent, string comment, Modifiers modifiers, string name)
            : base(src, parent, name)
        {
            DocComment = comment;
            Modifiers  = modifiers;
            Interfaces = InterfaceTypes.Empty;
            Attributes = AttributeList.Empty;
            SourceFiles.Add(src.FullPath);

            if (!IsGenericParameter && parent is DataType &&
                (parent as DataType).IsFlattenedDefinition)
            {
                var parentParams = (parent as DataType).FlattenedParameters;
                _flattenedParameters = new GenericParameterType[parentParams.Length];

                for (int i = 0; i < _flattenedParameters.Length; i++)
                {
                    _flattenedParameters[i] = parentParams[i];
                }
            }

            if (IsIntrinsic)
            {
                Intrinsics.TryGetValue(QualifiedName, out BuiltinType);
            }
        }