diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-06-10 14:11:59 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-06-11 23:49:33 +0300 |
| commit | 0333ff4476d0132a2397122dcab964de7fc0f2d3 (patch) | |
| tree | 8032dc588ab76313580feec71e07077ab1209960 /src/codegen.zig | |
| parent | 488e1e5f51905485f9db37038e74bdea31ebd16e (diff) | |
| download | zig-0333ff4476d0132a2397122dcab964de7fc0f2d3.tar.gz zig-0333ff4476d0132a2397122dcab964de7fc0f2d3.zip | |
stage2: make `error{}` the same size as `anyerror`
Having `error{}` be a zero bit type causes issues when it interracts
with empty inferred error sets which are the same size as `anyerror`.
Diffstat (limited to 'src/codegen.zig')
| -rw-r--r-- | src/codegen.zig | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/codegen.zig b/src/codegen.zig index 84615d86d8..025decdb4b 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -705,15 +705,6 @@ pub fn generateSymbol( .ErrorUnion => { const error_ty = typed_value.ty.errorUnionSet(); const payload_ty = typed_value.ty.errorUnionPayload(); - - if (error_ty.errorSetCardinality() == .zero) { - const payload_val = typed_value.val.castTag(.eu_payload).?.data; - return generateSymbol(bin_file, src_loc, .{ - .ty = payload_ty, - .val = payload_val, - }, code, debug_output, reloc_info); - } - const is_payload = typed_value.val.errorUnionIsPayload(); if (!payload_ty.hasRuntimeBitsIgnoreComptime()) { |
