Exemplo n.º 1
0
 public IOrType <WeakTypeDefinition, WeakGenericTypeDefinition, Tac.SyntaxModel.Elements.AtomicTypes.IPrimitiveType> Convert(Tpn.TypeSolution typeSolution, Tpn.TypeProblem2.Type from, IEnumerable <Tpn.ITypeProblemNode> context)
 {
     return(OrType.Make <WeakTypeDefinition, WeakGenericTypeDefinition, Tac.SyntaxModel.Elements.AtomicTypes.IPrimitiveType>(PrimitiveType));
 }
Exemplo n.º 2
0
 public GenericTypeDefinitionResolveReferance(Tpn.TypeProblem2.Type myScope, IOrType <IResolve <IBox <IFrontendCodeElement> >, IError>[] lines)
 {
     this.myScope = myScope;
     this.lines   = lines;
 }
Exemplo n.º 3
0
        public IOrType <WeakTypeDefinition, WeakGenericTypeDefinition, Tac.SyntaxModel.Elements.AtomicTypes.IPrimitiveType> Convert(Tpn.TypeSolution typeSolution, Tpn.TypeProblem2.Type from, IEnumerable <Tpn.ITypeProblemNode> context)
        {
            //if (typeParmereIndex.Is(out var index)) {
            //    new GenericTypeParameterPlacholder(index, typeSolution.);
            //}

            //var placeHolders = Tpn.TypeSolution.HasPlacholders(from);

            if (from.Generics.Any())
            {
                return(OrType.Make <WeakTypeDefinition, WeakGenericTypeDefinition, Tac.SyntaxModel.Elements.AtomicTypes.IPrimitiveType>(
                           new WeakGenericTypeDefinition(
                               from.Key,
                               typeSolution.GetHasMemberType(from, context),
                               from.Generics.Select(x => typeSolution.GetGenericPlaceholder(x.Value, context)).ToArray())));// from.Generics.Select(x=>Possibly.Is< IGenericTypeParameterPlacholder>(x.Value.Converter.Convert(typeSolution,x.Value))).ToArray()));
            }

            return(OrType.Make <WeakTypeDefinition, WeakGenericTypeDefinition, Tac.SyntaxModel.Elements.AtomicTypes.IPrimitiveType>(
                       new WeakTypeDefinition(typeSolution.GetHasMemberType(from, context))));//, key ?
        }