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

Static constructors should work with deepImmutablesDetection #794

Open
Diagoras opened this issue Jun 17, 2018 · 0 comments
Open

Static constructors should work with deepImmutablesDetection #794

Diagoras opened this issue Jun 17, 2018 · 0 comments

Comments

@Diagoras
Copy link

While builders work with deepImmutablesDetection = true, static constructors generated using allParameters = true or @Value.Parameter do not. Modifying the example from the documentation:

@Value.Immutable
@Value.Style(deepImmutablesDetection = true)
public interface PointHolder {
 @Value.Parameter
  Point point();
}

@Value.Immutable
@Value.Style(allParameters = true)
public interface Point {
  int x();
  int y();
}

ImmutablePointHolder line = ImmutablePointHolder.of(1, 2); // Compile time error, expects Point
}

I understand that this is a feature request, since right now the Javadoc makes clear that deep Immutables detection only works for builders.

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