mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
If a name is not found in a class, perform lookup into base classes. (#3502)
This builds out a little infrastructure for one name scope to `extend` another. We'll need more refinement here to cover other cases, but this should provide some foundation for that future work. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
co-authored by
Jon Ross-Perkins
parent
23c7d7dd99
commit
de0c02ddae
@@ -1032,12 +1032,19 @@ auto ConvertToValueOrRefExpr(Context& context, SemIR::InstId expr_id)
|
||||
}
|
||||
|
||||
auto ConvertToValueOfType(Context& context, Parse::NodeId parse_node,
|
||||
SemIR::InstId value_id, SemIR::TypeId type_id)
|
||||
SemIR::InstId expr_id, SemIR::TypeId type_id)
|
||||
-> SemIR::InstId {
|
||||
return Convert(context, parse_node, value_id,
|
||||
return Convert(context, parse_node, expr_id,
|
||||
{.kind = ConversionTarget::Value, .type_id = type_id});
|
||||
}
|
||||
|
||||
auto ConvertToValueOrRefOfType(Context& context, Parse::NodeId parse_node,
|
||||
SemIR::InstId expr_id, SemIR::TypeId type_id)
|
||||
-> SemIR::InstId {
|
||||
return Convert(context, parse_node, expr_id,
|
||||
{.kind = ConversionTarget::ValueOrRef, .type_id = type_id});
|
||||
}
|
||||
|
||||
auto ConvertToBoolValue(Context& context, Parse::NodeId parse_node,
|
||||
SemIR::InstId value_id) -> SemIR::InstId {
|
||||
return ConvertToValueOfType(
|
||||
|
||||
Reference in New Issue
Block a user