Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include inherited functions in Subcomponent Factory checks #1038

Merged
merged 3 commits into from
Jul 20, 2024

Conversation

RBusarow
Copy link
Member

fixes #1003

Our checks for a single abstract method in a @ContributesSubcomponent.Factory-annotated interface do not consider functions that are defined in a supertype. The existing ClassReference.functions property was somewhat ambiguously named, which probably contributed to the error.

This deprecates `ClassReference.functions` and `ClassReference.properties` in favor of two new properties each.

Changes:

|     old, now deprecated     | new                                                                               |
|:---------------------------:|-----------------------------------------------------------------------------------|
| `ClassReference.functions`  | `ClassReference.memberFunctions` </br> `ClassReference.declaredMemberFunctions`   |
| `ClassReference.properties` | `ClassReference.memberProperties` </br> `ClassReference.declaredMemberProperties` |
@RBusarow RBusarow requested a review from JoelWilcox July 19, 2024 23:00
@RBusarow RBusarow marked this pull request as ready for review July 19, 2024 23:22
public abstract val declaredMemberProperties: List<MemberPropertyReference>

/**
* All properties declared in this class or any of its super-types.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, the new api and comments are very clear

@RBusarow RBusarow merged commit 741de24 into main Jul 20, 2024
17 checks passed
@RBusarow RBusarow deleted the rick/declaredMemberProperties branch July 20, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ContributesSubcomponent.Factory doesn't support inherited functions
2 participants