Exemplo n.º 1
0
        public static AbstractType[] GetOverloads(IdentifierExpression id, ResolverContextStack ctxt)
        {
            var raw = TypeDeclarationResolver.ResolveIdentifier(id.Value as string, ctxt, id, id.ModuleScoped);
            var f   = DResolver.FilterOutByResultPriority(ctxt, raw);

            return(f == null ? null : f.ToArray());
        }
Exemplo n.º 2
0
        public static AbstractType[] GetOverloads(IdentifierExpression id, ResolutionContext ctxt, IEnumerable <AbstractType> resultBases = null, bool deduceParameters = true)
        {
            AbstractType[] res;
            if (resultBases == null)
            {
                res = TypeDeclarationResolver.ResolveIdentifier(id.ValueStringHash, ctxt, id, id.ModuleScoped);
            }
            else
            {
                res = TypeDeclarationResolver.ResolveFurtherTypeIdentifier(id.ValueStringHash, resultBases, ctxt, id);
            }

            if (res == null)
            {
                return(null);
            }

            var f = DResolver.FilterOutByResultPriority(ctxt, res);

            if (f.Count == 0)
            {
                return(null);
            }

            return((ctxt.Options & ResolutionOptions.NoTemplateParameterDeduction) == 0 && deduceParameters?
                   TemplateInstanceHandler.DeduceParamsAndFilterOverloads(f, null, false, ctxt) :
                       f.ToArray());
        }
Exemplo n.º 3
0
        public static AbstractType[] GetOverloads(IdentifierExpression id, ResolutionContext ctxt, bool deduceParameters = true)
        {
            var raw = TypeDeclarationResolver.ResolveIdentifier(id.ValueStringHash, ctxt, id, id.ModuleScoped);
            var f   = DResolver.FilterOutByResultPriority(ctxt, raw);

            if (f == null)
            {
                return(null);
            }

            return((ctxt.Options & ResolutionOptions.NoTemplateParameterDeduction) == 0 && deduceParameters?
                   TemplateInstanceHandler.DeduceParamsAndFilterOverloads(f, null, false, ctxt) :
                       f.ToArray());
        }