mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Allow incomplete types in associated constants (#6657)
Reference: #1084, [Example of declaring interfaces with cyclic references](https://github.com/carbon-language/carbon-lang/blob/trunk/docs/design/generics/details.md#example-of-declaring-interfaces-with-cyclic-references). Part of #6411: "Associated constants shouldn't have to be complete".
This commit is contained in:
@@ -366,13 +366,6 @@ auto HandleParseNode(Context& context,
|
||||
// add a proper diagnostic.
|
||||
context.TODO(node_id, "_ used as associated constant name");
|
||||
}
|
||||
cast_type_id = AsCompleteType(context, cast_type_id, type_node, [&] {
|
||||
CARBON_DIAGNOSTIC(IncompleteTypeInAssociatedConstantDecl, Error,
|
||||
"associated constant has incomplete type {0}",
|
||||
SemIR::TypeId);
|
||||
return context.emitter().Build(
|
||||
type_node, IncompleteTypeInAssociatedConstantDecl, cast_type_id);
|
||||
});
|
||||
|
||||
SemIR::AssociatedConstantDecl assoc_const_decl = {
|
||||
.type_id = cast_type_id,
|
||||
|
||||
Reference in New Issue
Block a user