| ... | ... | @@ -1141,8 +1141,10 @@ pub const DeclGen = struct { |
| 1141 | 1141 | |
| 1142 | 1142 | if (!payload_ty.hasRuntimeBits()) { |
| 1143 | 1143 | // We use the error type directly as the type. |
| 1144 | | const err_val = if (val.errorUnionIsPayload()) Value.initTag(.zero) else val; |
| 1145 | | return dg.renderValue(writer, error_ty, err_val, location); |
| 1144 | if (val.errorUnionIsPayload()) { |
| 1145 | return try writer.writeByte('0'); |
| 1146 | } |
| 1147 | return dg.renderValue(writer, error_ty, val, location); |
| 1146 | 1148 | } |
| 1147 | 1149 | |
| 1148 | 1150 | if (location != .Initializer) { |