We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.10.0-dev.3978+4fd4c733d
fn f(comptime _: fn (anytype) void) void {} fn g(_: anytype) void {} test { f(g); }
All 1 tests passed.
thread 523 panic: reached unreachable code Analyzing repro.zig: repro.zig:f__anon_970 > %7 = param_comptime("", { %2 = block_inline({ %3 = param_anytype("") token_offset:1:22 to :1:29 %4 = func(ret_ty=@Zir.Inst.Ref.void_type, body={}) node_offset:1:18 to :1:35 %5 = break_inline(%2, %4) }) node_offset:1:18 to :1:35 %6 = break_inline(%7, %2) }) token_offset:1:15 to :1:16 %9 = func(ret_ty=@Zir.Inst.Ref.void_type, body={ %8 = ret_tok(@Zir.Inst.Ref.void_value) token_offset:1:43 to :1:44 }) (lbrace=1:42,rbrace=1:43) node_offset:1:1 to :1:44 %10 = break_inline(%1, %9) For full context, use the command zig ast-check -t repro.zig in repro.zig: repro.zig:test_0 > %21 = call(nodiscard .auto, %19, [ {%22, %23}, ]) node_offset:4:5 to :4:9 /home/jacob/Source/zig/lib/std/debug.zig:281:14: 0x7e9293 in assert (zig) if (!ok) unreachable; // assertion failure ^ /home/jacob/Source/zig/lib/std/hash_map.zig:995:41: 0x15ec047 in putNoClobberContext (zig) ^ /home/jacob/Source/zig/lib/std/hash_map.zig:992:44: 0x141abf8 in putNoClobber (zig) }; ^ /home/jacob/Source/zig/src/Sema.zig:8192:47: 0x117d06c in zirParam (zig) try sema.inst_map.putNoClobber(sema.gpa, inst, .generic_poison); ^ /home/jacob/Source/zig/src/Sema.zig:1129:34: 0xf158d6 in analyzeBodyInner (zig) try sema.zirParam(block, inst, true); ^ /home/jacob/Source/zig/src/Sema.zig:626:45: 0xd701c8 in analyzeBodyBreak (zig) const break_inst = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/jacob/Source/zig/src/Sema.zig:591:50: 0x13847b5 in resolveBody (zig) const break_data = (try sema.analyzeBodyBreak(block, body)) orelse ^ /home/jacob/Source/zig/src/Sema.zig:6608:53: 0x159e568 in instantiateGenericCall (zig) const new_func_inst = child_sema.resolveBody(&child_block, fn_info.param_body, fn_info.param_body_inst) catch |err| { ^ /home/jacob/Source/zig/src/Sema.zig:5803:40: 0x138912c in analyzeCall (zig) if (sema.instantiateGenericCall( ^ /home/jacob/Source/zig/src/Sema.zig:5595:28: 0x10d1c02 in zirCall (zig) return sema.analyzeCall(block, func, func_src, call_src, modifier, ensure_result_used, resolved_args, bound_arg_src); ^ /home/jacob/Source/zig/src/Sema.zig:725:62: 0xf07e89 in analyzeBodyInner (zig) .call => try sema.zirCall(block, inst), ^ /home/jacob/Source/zig/src/Sema.zig:609:30: 0xf063f8 in analyzeBody (zig) _ = sema.analyzeBodyInner(block, body) catch |err| switch (err) { ^ /home/jacob/Source/zig/src/Module.zig:5570:21: 0xd59093 in analyzeFnBody (zig) sema.analyzeBody(&inner_block, fn_info.body) catch |err| switch (err) { ^ /home/jacob/Source/zig/src/Module.zig:4271:40: 0xb545b4 in ensureFuncBodyAnalyzed (zig) var air = mod.analyzeFnBody(func, sema_arena) catch |err| switch (err) { ^ /home/jacob/Source/zig/src/Compilation.zig:2982:42: 0xb52b12 in processOneJob (zig) module.ensureFuncBodyAnalyzed(func) catch |err| switch (err) { ^ /home/jacob/Source/zig/src/Compilation.zig:2920:30: 0xa4695e in performAllTheWork (zig) try processOneJob(comp, work_item); ^ /home/jacob/Source/zig/src/Compilation.zig:2260:31: 0xa43255 in update (zig) try comp.performAllTheWork(main_progress_node); ^ /home/jacob/Source/zig/src/main.zig:3360:20: 0xa6d2f6 in updateModule (zig) try comp.update(); ^ /home/jacob/Source/zig/src/main.zig:3034:17: 0x80c081 in buildOutputType (zig) updateModule(gpa, comp, hook) catch |err| switch (err) { ^ /home/jacob/Source/zig/src/main.zig:236:31: 0x7e6d3b in mainArgs (zig) return buildOutputType(gpa, arena, args, .zig_test); ^ /home/jacob/Source/zig/src/main.zig:174:20: 0x7e6180 in main (zig) return mainArgs(gpa, arena, args); ^ /home/jacob/Source/zig/lib/std/start.zig:578:37: 0x7e86a9 in main (zig) const result = root.main() catch |err| { ^ Aborted
try sema.inst_map.put(sema.gpa, inst, .generic_poison);
But, I don't know if this is just hiding a deeper issue.
The text was updated successfully, but these errors were encountered:
prev hashmap.put callstack
frame #0: 0x0000000100fd6fbd zig`Sema.zirParam at Sema.zig:8236:5 frame #1: 0x0000000100d55aaf zig`Sema.analyzeBodyInner at Sema.zig:1131:34 frame #2: 0x0000000100bb8bba zig`Sema.analyzeBodyBreak at Sema.zig:628:45 frame #3: 0x0000000100bb5139 zig`Module.semaDecl at Module.zig:4570:50 frame #4: 0x00000001009c2668 zig`Module.ensureDeclAnalyzed at Module.zig:4205:38 frame #5: 0x000000010123f0ac zig`Sema.ensureDeclAnalyzed at Sema.zig:26066:32 frame #6: 0x0000000100fe53f7 zig`Sema.analyzeDeclRef at Sema.zig:26108:32 frame #7: 0x000000010120e908 zig`Sema.analyzeDeclVal at Sema.zig:26036:45 frame #8: 0x0000000100f2dfeb zig`Sema.zirDeclVal at Sema.zig:5419:31 frame #9: 0x0000000100d488a8 zig`Sema.analyzeBodyInner at Sema.zig:737:65 frame #10: 0x0000000100d464ca zig`Sema.analyzeBody at Sema.zig:611:30 frame #11: 0x0000000100ba096f zig`Module.analyzeFnBody at Module.zig:5590:21 frame #12: 0x00000001009c14f9 zig`Module.ensureFuncBodyAnalyzed at Module.zig:4291:40 frame #13: 0x00000001009bf8f8 zig`Compilation.processOneJob at Compilation.zig:3047:42 frame #14: 0x00000001008c03b3 zig`Compilation.performAllTheWork at Compilation.zig:2985:30 frame #15: 0x00000001008bcdfb zig`Compilation.update at Compilation.zig:2325:31 frame #16: 0x00000001008e8008 zig`main.updateModule at main.zig:3376:20 frame #17: 0x000000010067df99 zig`main.buildOutputType at main.zig:3061:17 frame #18: 0x0000000100602367 zig`main.mainArgs at main.zig:234:31 frame #19: 0x0000000100601804 zig`main at stage1.zig:48:24 frame #20: 0x00007fff63f4b3d5 libdyld.dylib`start + 1 frame #21: 0x00007fff63f4b3d5 libdyld.dylib`start + 1
first time from 'zirDeclVal', the second time from 'zirCall'
Sorry, something went wrong.
6da070c
No branches or pull requests
Zig Version
0.10.0-dev.3978+4fd4c733d
Steps to Reproduce
Expected Behavior
Actual Behavior
Workaround
But, I don't know if this is just hiding a deeper issue.
The text was updated successfully, but these errors were encountered: