Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Parcelable generic argument doesn't work in @FragmentArg  #1484

Copy link
Copy link
@pashky

Description

@pashky
Issue body actions

Hi, I'm experiencing some trouble with generated code, if @efragment is generic.

For example, if I have following declaration:

@EFragment
public class ChoiceDialog<PayloadType extends Parcelable> extends Fragment {
    @FragmentArg 
    PayloadType payload;
     ...
}

Generated build then still tries to put Serializable into bundle:

        public ChoiceDialog_.FragmentBuilder_ payload(PayloadType callbackData) {
            args.putSerializable(PAYLOAD_ARG, callbackData);
            return this;
        }

I hope it's possible to find out upper bound from generics declaration and fix it, so it will put correct type. I'm fairly okay to revert to PayloadType extends Serializable in my case, which would work as putSerializable seems to be default, but still it would be nice to see it fixed in future.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.