You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> x = (1,)
(1,)
julia> x.x
julia: /home/tim/Julia/src/julia/src/codegen.cpp:3882: bool emit_builtin_call(jl_codectx_t&, jl_cgval_t*, jl_value_t*, const jl_cgval_t*, size_t, jl_value_t*, jl_expr_t*, bool): Assertion `jl_svec_len(fn) == 1' failed.
[3543259] signal (6.-6): Aborted
in expression starting at REPL[2]:1
unknown function (ip: 0x7f865388e83c)
raise at /usr/lib/libc.so.6 (unknown line)
abort at /usr/lib/libc.so.6 (unknown line)
unknown function (ip: 0x7f86538263db)
__assert_fail at /usr/lib/libc.so.6 (unknown line)
emit_builtin_call at /home/tim/Julia/src/julia/src/codegen.cpp:3882
emit_call at /home/tim/Julia/src/julia/src/codegen.cpp:4650
emit_expr at /home/tim/Julia/src/julia/src/codegen.cpp:5572
emit_ssaval_assign at /home/tim/Julia/src/julia/src/codegen.cpp:5162
emit_function at /home/tim/Julia/src/julia/src/codegen.cpp:8517
Looks like the code assumes that the length of jl_field_names equals jl_datatype_nfields, which doesn't hold here: For Tuple{Int}, jl_datatype_nfields (or t->layout->nfields) is 1, while jl_field_names (or t->name->names) returns an empty svec. I guess that's why we specialize Tuple here:
MWE:
Looks like the code assumes that the length of
jl_field_names
equalsjl_datatype_nfields
, which doesn't hold here: ForTuple{Int}
,jl_datatype_nfields
(ort->layout->nfields
) is 1, whilejl_field_names
(ort->name->names
) returns an empty svec. I guess that's why we specialize Tuple here:julia/base/reflection.jl
Lines 167 to 172 in 27fa5de
The text was updated successfully, but these errors were encountered: