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

Error when using generics and extending an interface or abstract class #348

Closed
arouel opened this issue May 31, 2016 · 2 comments
Closed

Comments

@arouel
Copy link
Contributor

arouel commented May 31, 2016

When building the following code

interface AbstractValue<T> {

    @Value.Immutable
    static abstract class Concrete1<T> implements AbstractValue<T> {
        @Value.Parameter
        abstract T reference();
    }

    @Value.Immutable
    static abstract class Concrete2<T> implements AbstractValue<T> {
        @Value.Parameter
        abstract T reference();
    }
}

the generator fails with

ImmutableConcrete2.java:214: error: illegal start of expression
      return ImmutableConcrete2<T>.validate(new ImmutableConcrete2<T>(null, reference));
                                  ^
ImmutableConcrete1.java:214: error: illegal start of expression
      return ImmutableConcrete1<T>.validate(new ImmutableConcrete1<T>(null, reference));
                                  ^
2 errors
@elucash elucash added the bug label May 31, 2016
@elucash elucash added this to the 2.2.2 milestone May 31, 2016
@elucash
Copy link
Member

elucash commented May 31, 2016

Thank you for reporting this! need to be fixed

@arouel arouel changed the title Error when using generics and extending an interface Error when using generics and extending an interface or abstract class Jun 2, 2016
@elucash
Copy link
Member

elucash commented Jun 3, 2016

Released in 2.2.2. Thank you!

@elucash elucash closed this as completed Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants