Skip to content

Fix type piracy of 0-arg cat #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2018
Merged

Fix type piracy of 0-arg cat #146

merged 1 commit into from
Sep 19, 2018

Conversation

iamed2
Copy link
Collaborator

@iamed2 iamed2 commented Sep 19, 2018

Fixes #145

The existing definition was causing this:

julia> cat(dims=1)
0-element Array{Any,1}

to become this:

julia> cat(dims=1)
ERROR: BoundsError: attempt to access ()
  at index [1]
Stacktrace:
 [1] getindex(::Tuple{}, ::Int64) at ./tuple.jl:24
 [2] _cat at /Users/ericdavies/.julia/dev/AxisArrays/src/combine.jl:20 [inlined]
 [3] #cat#44(::Int64, ::Function) at /Users/ericdavies/.julia/dev/AxisArrays/src/combine.jl:16
 [4] (::getfield(Base, Symbol("#kw##cat")))(::NamedTuple{(:dims,),Tuple{Int64}}, ::typeof(cat)) at ./none:0
 [5] top-level scope at none:0

@mbauman mbauman merged commit 5b1fd0e into master Sep 19, 2018
@mbauman mbauman deleted the ed/cat-pirate branch September 19, 2018 15:31
@mbauman
Copy link
Member

mbauman commented Sep 19, 2018

51yl023v6kl sx425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants