svlog: value: Emit tombstone in type_default_value
@@ -667,11 +667,10 @@ pub(crate) fn is_constant<'gcx>(cx: &impl Context<'gcx>, node_id: NodeId) -> Res
/// Determine the default value of a type.
pub(crate) fn type_default_value<'gcx>(cx: &impl Context<'gcx>, ty: Type<'gcx>) -> Value<'gcx> {
- // TODO(fschuiki): Make this function return `Result<Value<_>>`.
match *ty {
TypeKind::Error => cx.intern_value(ValueData {
ty: &ty::ERROR_TYPE,
- kind: ValueKind::Void,
+ kind: ValueKind::Error,
}),
TypeKind::Void => cx.intern_value(ValueData {
ty: &ty::VOID_TYPE,
