mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 07:25:49 +01:00
Add Abstract enumerator to InitRepr::Kind (#6513)
This fixes a bug where `CheckFunctionReturnType` could sometimes fail to diagnose an abstract return type.
This commit is contained in:
@@ -282,6 +282,9 @@ auto FunctionContext::FinishInit(TypeInFile type, SemIR::InstId dest_id,
|
||||
case SemIR::InitRepr::ByCopy:
|
||||
CopyValue(type, source_id, dest_id);
|
||||
break;
|
||||
case SemIR::InitRepr::Abstract:
|
||||
CARBON_FATAL("Lowering aggregate initialization of abstract type {0}",
|
||||
type.file->types().GetAsInst(type.type_id));
|
||||
case SemIR::InitRepr::Incomplete:
|
||||
CARBON_FATAL("Lowering aggregate initialization of incomplete type {0}",
|
||||
type.file->types().GetAsInst(type.type_id));
|
||||
|
||||
Reference in New Issue
Block a user