private IPythonType CreateItemsViewType(IReadOnlyList <IPythonType> typeArgs) { if (typeArgs.Count == 2) { return(TypingTypeFactory.CreateItemsViewType(Interpreter, typeArgs[0], typeArgs[1])); } // TODO: report wrong number of arguments return(Interpreter.UnknownType); }
private IPythonType CreateItemsViewType(IReadOnlyList <IPythonType> typeArgs) { if (typeArgs.Count == 2) { // If argument is generic type parameter then this is still a generic specification return(typeArgs.Any(a => a is IGenericTypeParameter) ? ToGenericTemplate("ItemsView", typeArgs.OfType <IGenericTypeParameter>().ToArray(), BuiltinTypeId.ListIterator) : TypingTypeFactory.CreateItemsViewType(Interpreter, typeArgs[0], typeArgs[1])); } // TODO: report wrong number of arguments return(Interpreter.UnknownType); }