Interfaces: implement validates, it does not copy implementations - #12597
Merged
Conversation
LeonMatthes
reviewed
Jul 27, 2026
LeonMatthes
left a comment
Member
There was a problem hiding this comment.
This is looking pretty good, just some minor issues.
0x6e
force-pushed
the
nathan/interfaces-validate-only
branch
from
July 27, 2026 10:52
75c2ac7 to
e555b37
Compare
LeonMatthes
approved these changes
Jul 27, 2026
0x6e
force-pushed
the
nathan/interfaces-validate-only
branch
from
July 27, 2026 12:56
2e76df8 to
dbef0e8
Compare
0x6e
force-pushed
the
nathan/interfaces-validate-only
branch
from
July 27, 2026 18:17
294915e to
5e4787a
Compare
…ace members `implement I <=> self;` no longer copies an interface's property/callback/function declarations onto the component. Instead it validates that the component declares or inherits every member, with matching type, visibility, and (for callbacks/functions) purity, via `validate_properties_and_callbacks` and `validate_function_implementations` in `object_tree/interfaces.rs`. Both validators now run in `object_tree.rs` after all of a component's own property, callback, and function declarations are registered, so a locally declared member of the same name is found rather than misreported as missing; a same-named but wrong-kind local declaration (e.g. a `callback` where the interface expects a `property`) is now reported as a kind conflict instead. Migrates every self-implementing component across the runtime test cases, compiler syntax tests, shipped widgets, and interface.mdx to explicitly declare the members their interfaces require, and updates the affected diagnostic wording to match the new validate-only semantics. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0x6e
force-pushed
the
nathan/interfaces-validate-only
branch
from
July 27, 2026 20:10
5e4787a to
ee5e7e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
implement I <=> self;no longer copies an interface's property/callback/function declarations onto the component. Instead it validates that the component declares or inherits every member, with matching type, visibility, and (for callbacks/functions) purity, viavalidate_properties_and_callbacksandvalidate_function_implementationsinobject_tree/interfaces.rs. Both validators now run inobject_tree.rsafter all of a component's own property, callback, and function declarations are registered, so a locally declared member of the same name is found rather than misreported as missing; a same-named but wrong-kind local declaration (e.g. acallbackwhere the interface expects aproperty) is now reported as a kind conflict instead.Migrates every self-implementing component across the runtime test cases, compiler syntax tests, shipped widgets, and interface.mdx to explicitly declare the members their interfaces require, and updates the affected diagnostic wording to match the new validate-only semantics.
Where possible we have re-used the existing error messages as we intend to improve these in a future PR.
Relates to #1870.