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
I was experimenting with the following function to get return types of both functions and bound functions:
fnReturnType(func: var) type {
returnswitch(@typeInfo(@typeOf(func))) {
.Fn=>|info|info,
.BoundFn=>|info|info,
else=>@compileError("attempt to get return type of non-function"),
}.return_type;
}
And I hit:
Unreachable at zig/src/analyze.cpp:5201 in hash_const_val. This is a bug in the Zig compiler.
Traceback:
#4 0x00005555556c4ae1 in hash_const_val (const_val=0x555556be5b38) at /home/daurnimator/src/zig/src/analyze.cpp:5201
#5 0x00005555556c525a in fn_eval_hash (scope=0x555556be5d70) at /home/daurnimator/src/zig/src/analyze.cpp:5384
#6 0x0000555555683d85 in HashMap<Scope*, ConstExprValue*, &(fn_eval_hash(Scope*)), &(fn_eval_eql(Scope*, Scope*))>::key_to_index (this=0x55555581f080, key=@0x7fffffffa248: 0x555556be5d70) at /home/daurnimator/src/zig/src/hash_map.hpp:238
#7 0x0000555555682cc7 in HashMap<Scope*, ConstExprValue*, &(fn_eval_hash(Scope*)), &(fn_eval_eql(Scope*, Scope*))>::internal_get (this=0x55555581f080, key=@0x7fffffffa248: 0x555556be5d70) at /home/daurnimator/src/zig/src/hash_map.hpp:223
#8 0x0000555555682047 in HashMap<Scope*, ConstExprValue*, &(fn_eval_hash(Scope*)), &(fn_eval_eql(Scope*, Scope*))>::maybe_get (this=0x55555581f080, key=@0x7fffffffa248: 0x555556be5d70) at /home/daurnimator/src/zig/src/hash_map.hpp:81
#9 0x000055555564a724 in ir_analyze_fn_call (ira=0x555556bdfcc0, call_instruction=0x555556bdf220, fn_entry=0x555556be0100, fn_type=0x555556be0470, fn_ref=0x555556be0850, first_arg_ptr=0x0, comptime_fn_call=true, fn_inline=FnInlineAuto) at /home/daurnimator/src/zig/src/ir.cpp:16771
#10 0x000055555564c848 in ir_analyze_instruction_call (ira=0x555556bdfcc0, call_instruction=0x555556bdf220) at /home/daurnimator/src/zig/src/ir.cpp:17253
The text was updated successfully, but these errors were encountered:
daurnimator
added
bug
Observed behavior contradicts documented or intended behavior
stage1
The process of building from source via WebAssembly and the C backend.
labels
Nov 16, 2019
I was experimenting with the following function to get return types of both functions and bound functions:
And I hit:
Traceback:
The text was updated successfully, but these errors were encountered: