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

Inheritance of package-private args with classes in different packages #62

Open
pamalyshev opened this issue Jun 11, 2016 · 0 comments
Open

Comments

@pamalyshev
Copy link

For example if we have two classes in different packages:

@FragmentWithArgs
public class ClassInPackageA extends android.app.Fragment {
    @Arg
    String argA;
}

and

@FragmentWithArgs
public class ClassInPackageB extends ClassInPackageA {
    @com.hannesdorfmann.fragmentargs.annotation.Arg
    String argB;
}

Then we'll get compilation error:

Error:(36, 13) error: argA is not public in ClassInPackageA; cannot be accessed from outside package

This is because ClassInPackageBBuilder#injectArguments is trying to access argA by itself.
One solution to this could be is to delegate to ClassInPackageABuilder#injectArguments.
I've created test for this in pamalyshev@dde8b1d

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

No branches or pull requests

1 participant