Exemplo n.º 1
0
            internal override bool Analyze(DirectTypeRef node, Analyzer analyzer)
            {
                resolvedType = analyzer.ResolveTypeName(node.ClassName, analyzer.CurrentType, analyzer.CurrentRoutine, node.Span, false);

                // base call must follow the class name resolution:
                bool args_static = base.Analyze(node, analyzer);

                if (args_static)
                {
                    DTypeDesc[] resolved_arguments = DTypeDesc.EmptyArray;
                    var         genericParams      = node.GenericParams;

                    if (genericParams != null && genericParams.Count > 0)
                    {
                        resolved_arguments = new DTypeDesc[genericParams.Count];
                        for (int i = 0; i < genericParams.Count; i++)
                        {
                            resolved_arguments[i] = TypeRefHelper.ResolvedType(genericParams[i]).TypeDesc;
                        }
                    }

                    resolvedType = resolvedType.MakeConstructedType(analyzer, resolved_arguments, node.Span);
                }

                return(args_static);
            }
Exemplo n.º 2
0
        internal override bool Analyze(Analyzer /*!*/ analyzer)
        {
            resolvedType = analyzer.ResolveTypeName(className, analyzer.CurrentType, analyzer.CurrentRoutine, position, false);

            // base call must follow the class name resolution:
            bool args_static = base.Analyze(analyzer);

            if (args_static)
            {
                DTypeDesc[] resolved_arguments = (genericParams.Count > 0) ? new DTypeDesc[genericParams.Count] : DTypeDesc.EmptyArray;
                for (int i = 0; i < genericParams.Count; i++)
                {
                    resolved_arguments[i] = genericParams[i].ResolvedType.TypeDesc;
                }

                resolvedType = resolvedType.MakeConstructedType(analyzer, resolved_arguments, position);
            }

            return(args_static);
        }
Exemplo n.º 3
0
		internal override bool Analyze(Analyzer/*!*/ analyzer)
		{
			resolvedType = analyzer.ResolveTypeName(className, analyzer.CurrentType, analyzer.CurrentRoutine, position, false);

			// base call must follow the class name resolution:
			bool args_static = base.Analyze(analyzer);

			if (args_static)
			{
				DTypeDesc[] resolved_arguments = (genericParams.Count > 0) ? new DTypeDesc[genericParams.Count] : DTypeDesc.EmptyArray;
				for (int i = 0; i < genericParams.Count; i++)
					resolved_arguments[i] = genericParams[i].ResolvedType.TypeDesc;

				resolvedType = resolvedType.MakeConstructedType(analyzer, resolved_arguments, position);
			}

			return args_static;
		}