mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:11:27 +01:00
Associated constants can be used in member function signatures (#5089)
This required allowing incomplete facet types where previously completeness was required. Once we support named constraints, we will need a way to consistently go from an interface to a facet type witness index without requiring the interface to be complete in these cases. --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
@@ -1148,7 +1148,10 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id,
|
||||
return SemIR::ErrorInst::SingletonInstId;
|
||||
}
|
||||
|
||||
// We can only perform initialization for complete, non-abstract types.
|
||||
// We can only perform initialization for complete, non-abstract types. Note
|
||||
// that `RequireConcreteType` returns true for facet types, since their
|
||||
// representation is fixed. This allows us to support using the `Self` of an
|
||||
// interface inside its definition.
|
||||
if (!RequireConcreteType(
|
||||
context, target.type_id, loc_id,
|
||||
[&] {
|
||||
|
||||
Reference in New Issue
Block a user