| ... | @@ -6333,6 +6333,7 @@ fn analyzeCall( | ... | @@ -6333,6 +6333,7 @@ fn analyzeCall( |
| 6333 | .instructions = .{}, | 6333 | .instructions = .{}, |
| 6334 | .label = null, | 6334 | .label = null, |
| 6335 | .inlining = &inlining, | 6335 | .inlining = &inlining, |
| | 6336 | .is_typeof = block.is_typeof, |
| 6336 | .is_comptime = is_comptime_call, | 6337 | .is_comptime = is_comptime_call, |
| 6337 | .comptime_reason = comptime_reason, | 6338 | .comptime_reason = comptime_reason, |
| 6338 | .error_return_trace_index = block.error_return_trace_index, | 6339 | .error_return_trace_index = block.error_return_trace_index, |
| ... | @@ -16532,9 +16533,6 @@ fn zirSaveErrRetIndex(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileE | ... | @@ -16532,9 +16533,6 @@ fn zirSaveErrRetIndex(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileE |
| 16532 | // This is only relevant at runtime. | 16533 | // This is only relevant at runtime. |
| 16533 | if (block.is_comptime or block.is_typeof) return; | 16534 | if (block.is_comptime or block.is_typeof) return; |
| 16534 | | 16535 | |
| 16535 | // This is only relevant within functions. | | |
| 16536 | if (sema.func == null) return; | | |
| 16537 | | | |
| 16538 | const save_index = inst_data.operand == .none or b: { | 16536 | const save_index = inst_data.operand == .none or b: { |
| 16539 | const operand = try sema.resolveInst(inst_data.operand); | 16537 | const operand = try sema.resolveInst(inst_data.operand); |
| 16540 | const operand_ty = sema.typeOf(operand); | 16538 | const operand_ty = sema.typeOf(operand); |
| ... | @@ -27505,9 +27503,6 @@ fn analyzeLoad( | ... | @@ -27505,9 +27503,6 @@ fn analyzeLoad( |
| 27505 | if (try sema.pointerDeref(block, src, ptr_val, ptr_ty)) |elem_val| { | 27503 | if (try sema.pointerDeref(block, src, ptr_val, ptr_ty)) |elem_val| { |
| 27506 | return sema.addConstant(elem_ty, elem_val); | 27504 | return sema.addConstant(elem_ty, elem_val); |
| 27507 | } | 27505 | } |
| 27508 | if (block.is_typeof) { | | |
| 27509 | return sema.addConstUndef(elem_ty); | | |
| 27510 | } | | |
| 27511 | } | 27506 | } |
| 27512 | | 27507 | |
| 27513 | return block.addTyOp(.load, elem_ty, ptr); | 27508 | return block.addTyOp(.load, elem_ty, ptr); |