immutables
immutables copied to clipboard
Value.Check not propagating to immutable interface subclasses
I have a immutable interface that extends another interface. The base interface has the @Value.Check annotation on a function. I would expect that the ImmutableSubclass would call the annotated function, that's not happening in practice. Is it expected that subinterfaces respect the @Value.Check annotation.
interface A {
@Value.Check
@Value.NonAttribute
void check();
}
@Value.Immutable
interface B extends A {
@Override
default void check() {
throw new IllegalStateException();
}
}
In the above example, I would expect ImmutableB.builder.build() would throw an exception, but its not.