JuliaLabs / Cassette.jl

Overdub Your Julia Code
Other
371 stars 35 forks source link

Inference issues with accessing hcat-ed arrays #170

Open freemin7 opened 4 years ago

freemin7 commented 4 years ago

This produces

@inferred overdub(Ctx(), x -> hcat(x,x)[1], [8,9,99])

ERROR: return type Int64 does not match inferred return type Any However

@inferred overdub(Ctx(), x -> x[1], hcat([8,9,99], [8,9,99]))

does not. I was told on Slack to create this issue since it did not go away when i ]add Cassette#master. I found it when playing around the code from https://github.com/jrevels/Cassette.jl/issues/153#issuecomment-544139001 but i have no idea what i am doing.