mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 15:22:43 +00:00
Previously the design required the impl declaration to meet its requirements, but in proposal #5168 that was changed. The rules are provided in a [table here] and from the [changes here]. Now associated constants can be set inside the body of the impl definition, which means requirements set in the impl declaration (like `.A impls Y` or `.B == C`) can't be checked until the end of the definition where we know all associated constants have been set. Likewise, the check that all associated constants have been set needs to be done at the end of the impl definition instead of at the start. And requirements from require decls in the interface being impl'd must also be met at the end of the definition now. [table here]: https://github.com/carbon-language/carbon-lang/blob/b7ea32c3a49620fae12f0b2298c81d429a20eab3/proposals/p005168-forward-impl-declaration-of-an-incomplete-interface.md#proposed-rules [changes here]: https://github.com/carbon-language/carbon-lang/blob/b7ea32c3a49620fae12f0b2298c81d429a20eab3/proposals/p005168-forward-impl-declaration-of-an-incomplete-interface.md#associated-constants-may-be-assigned-in-the-body-of-an-impl-definition