mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Find the builtin TypeCanAggregateDestroy in the FacetType for facet values (#6119)
When doing impl lookup with a constraint facet type including the builtin `TypeCanAggregateDestroy`, we look at the type to see if it satisfies it. However if the type is a facet value, we need to look at the FacetType to see if the eventual concrete type is going to satisfy it. Note that we can do this check up front in the `LookupImplWitness()` function without creating a symbolic instruction to be modified by future specifics with a more precise type for the facet value, because the result of `TypeCanAggregateDestroy` does not actually provide a witness, so we don't need the final specific type. This was noticed by removing the "shortcut" in convert for converting a `FacetAccessType(<symbolic binding>)` to `typeof(<symbolic binding>)`. By removing the shortcut, we go into impl lookup when checking `impl` decls containing `TypeCanAggregateDestroy` via deduce.
This commit is contained in:
@@ -1225,9 +1225,6 @@ static auto PerformBuiltinConversion(
|
||||
// form. We can skip past the whole impl lookup step then and do that
|
||||
// here.
|
||||
//
|
||||
// See also test:
|
||||
// facet_access_type_converts_back_to_original_facet_value.carbon
|
||||
//
|
||||
// TODO: This instruction is going to become a `SymbolicBindingType`, so
|
||||
// we'll need to handle that instead.
|
||||
auto const_type_inst_id =
|
||||
|
||||
Reference in New Issue
Block a user