Skip to content

Add Coerce support for Accessors/Invokers#2

Open
Rongmario wants to merge 1 commit into
mainfrom
feature/coerced-accessors
Open

Add Coerce support for Accessors/Invokers#2
Rongmario wants to merge 1 commit into
mainfrom
feature/coerced-accessors

Conversation

@Rongmario

Copy link
Copy Markdown
Member
  • Allows @Coerce on @Accessor and @Invoker methods so mixin authors can use supertypes (Object, ifaces) when the actual target field/method type is inaccessible.
  • When coerced, target resolution falls back to name-only matching (descriptor is omitted) so the inaccessible type doesn't need to appear in the accessor signature.
  • For field setters with coercion, a CHECKCAST is emitted before PUTFIELD to narrow the supertype parameter back to the concrete field type.
  • Annotation processor validation is relaxed accordingly. Coerced accessors/invokers no longer trigger type-mismatch errors.

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.

1 participant