Skip to content

Commit

Permalink
Add test for issue #15703, bounds error for NTuple (#20151)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinfang authored and tkelman committed Jan 24, 2017
1 parent 08adcd3 commit 75302ae
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/tuple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,28 @@ end
@test_throws BoundsError (1,2,3)[falses(2)]
@test_throws BoundsError ()[[false]]
@test_throws BoundsError ()[[true]]

# issue #15703
let
immutable A_15703{N}
keys::NTuple{N, Int}
end

immutable B_15703
x::A_15703
end

function bug_15703(xs...)
[x for x in xs]
end

function test_15703()
s = (1,)
a = A_15703(s)
ss = B_15703(a).x.keys
@test ss === s
bug_15703(ss...)
end

test_15703()
end

0 comments on commit 75302ae

Please sign in to comment.