Skip to content

bug in comprehension eltype with load("file.jl") #616

@carlobaldassi

Description

@carlobaldassi

Element type inference in comprehensions acts differently when commands are typed in the REPL or loaded from a file.
Using a single command:

v = [ i::Int | i = 1 : 10 ]

When typed directly everything's ok:

julia> v = [ i::Int | i = 1 : 10 ]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

When put into a file and loaded:

julia> load("compr_tst.jl")

julia> v
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

julia> typeof(v)
Array{Any,1}

(the same happens when calling julia compr_tst.jl at the command line).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions