File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -13011,10 +13011,13 @@ fn analyzeRet(
13011
13011
const backend_supports_error_return_tracing =
13012
13012
sema.mod.comp.bin_file.options.use_llvm;
13013
13013
13014
- if (( sema.fn_ret_ty.zigTypeTag() == .ErrorSet or sema.typeOf(uncasted_operand).zigTypeTag() == .ErrorUnion ) and
13014
+ if (sema.fn_ret_ty.isError( ) and
13015
13015
sema.mod.comp.bin_file.options.error_return_tracing and
13016
13016
backend_supports_error_return_tracing)
13017
- {
13017
+ ret_err: {
13018
+ if (try sema.resolveMaybeUndefVal(block, src, operand)) |ret_val| {
13019
+ if (ret_val.tag() != .@"error") break :ret_err;
13020
+ }
13018
13021
const return_err_fn = try sema.getBuiltin(block, src, "returnError");
13019
13022
const unresolved_stack_trace_ty = try sema.getBuiltinType(block, src, "StackTrace");
13020
13023
const stack_trace_ty = try sema.resolveTypeFields(block, src, unresolved_stack_trace_ty);
You can’t perform that action at this time.
0 commit comments