mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Fix handling of member types of generic classes. (#5332)
Instead of evaluating a non-parameterized class or interface to a constant with `SpecificId::None`, use the self specific for that class or interface, which will not be `None` if there is an enclosing generic.
This commit is contained in:
@@ -1674,7 +1674,7 @@ static auto ComputeInstPhase(Context& context, SemIR::Inst inst) -> Phase {
|
||||
context.types().GetConstantId(inst.type_id()));
|
||||
GetConstantValueForArg(eval_context, inst.arg0_and_kind(), &phase);
|
||||
GetConstantValueForArg(eval_context, inst.arg1_and_kind(), &phase);
|
||||
CARBON_CHECK(IsConstant(phase));
|
||||
CARBON_CHECK(phase != Phase::Runtime);
|
||||
return phase;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user