Skip to content

unique(itr) doesn't infer types for a generator #20105

Closed
@colinfang

Description

@colinfang

Unlike Set or collect, unique(itr) doesn't infer types from the generator.

unique(x for x in 1:3)

3-element Array{Any,1}:
 1
 2
 3

It should return Array{Int, 1}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    collectionsData structures holding multiple items, e.g. setscompiler:codegenGeneration of LLVM IR and native codecompiler:inferenceType inference

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions