mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:14:43 +01:00
Support for calling non-generic methods in a specific class. (#4156)
Use the specific parameter types for checking, and the specific return type as the type of the call.
This commit is contained in:
@@ -1188,6 +1188,9 @@ auto TryEvalInstInContext(EvalContext& eval_context, SemIR::InstId inst_id,
|
||||
case SemIR::ClassType::Kind:
|
||||
return RebuildIfFieldsAreConstant(eval_context, inst,
|
||||
&SemIR::ClassType::instance_id);
|
||||
case SemIR::FunctionType::Kind:
|
||||
return RebuildIfFieldsAreConstant(eval_context, inst,
|
||||
&SemIR::FunctionType::instance_id);
|
||||
case SemIR::InterfaceType::Kind:
|
||||
return RebuildIfFieldsAreConstant(eval_context, inst,
|
||||
&SemIR::InterfaceType::instance_id);
|
||||
@@ -1252,7 +1255,6 @@ auto TryEvalInstInContext(EvalContext& eval_context, SemIR::InstId inst_id,
|
||||
return RebuildInitAsValue(eval_context, inst, SemIR::TupleValue::Kind);
|
||||
|
||||
case SemIR::BuiltinInst::Kind:
|
||||
case SemIR::FunctionType::Kind:
|
||||
case SemIR::GenericClassType::Kind:
|
||||
case SemIR::GenericInterfaceType::Kind:
|
||||
// Builtins are always template constants.
|
||||
|
||||
Reference in New Issue
Block a user