Skip to content

Commit

Permalink
fix #41157, unnecessary assertion on Tuple{Union{}}
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jul 6, 2021
1 parent 0189772 commit 67044ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ static Value *emit_unboxed_coercion(jl_codectx_t &ctx, Type *to, Value *unboxed)
Type *ty = unboxed->getType();
if (ty == to)
return unboxed;
assert(to->isIntOrPtrTy() || to->isFloatingPointTy());
bool frompointer = ty->isPointerTy();
bool topointer = to->isPointerTy();
const DataLayout &DL = jl_data_layout;
Expand Down
4 changes: 4 additions & 0 deletions test/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -593,3 +593,7 @@ f41438(y) = y[].x
@test B41438.body.layout === C_NULL
@test f41438(Ref{A41438}(A41438(C_NULL))) === C_NULL
@test f41438(Ref{B41438}(B41438(C_NULL))) === C_NULL

# issue #41157
f41157(a, b) = a[1] = b[1]
@test_throws BoundsError f41157(Tuple{Int}[], Tuple{Union{}}[])

0 comments on commit 67044ba

Please sign in to comment.