Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3877,7 +3877,7 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f,
}
else if (fld.typ == (jl_value_t*)jl_symbol_type) { // Known type but unknown symbol
if (jl_is_datatype(utt) && (utt != jl_module_type) && jl_struct_try_layout(utt)) {
if ((jl_datatype_nfields(utt) == 1 && !jl_is_namedtuple_type(utt))) {
if ((jl_datatype_nfields(utt) == 1 && !jl_is_namedtuple_type(utt) && !jl_is_tuple_type(utt))) {
jl_svec_t *fn = jl_field_names(utt);
assert(jl_svec_len(fn) == 1);
Value *typ_sym = literal_pointer_val(ctx, jl_svecref(fn, 0));
Expand Down
4 changes: 4 additions & 0 deletions test/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -863,3 +863,7 @@ end
@noinline bar50964(x::DataType) = Base.inferencebarrier(2)
foo50964(x) = bar50964(Base.inferencebarrier(Core.Const(x)))
foo50964(1) # Shouldn't assert!

# https://github.com/JuliaLang/julia/issues/51233
obj51233 = (1,)
@test_throws ErrorException obj51233.x