shallow compilation test for With-interface signatures
@@ -7,4 +7,14 @@ import org.immutables.value.Value;
public interface WithMapUnary extends WithUnaryOperator, WithWithMapUnary {
// inherit all attributes from WithUnaryOperator and generate With-interface
class Builder extends ImmutableWithMapUnary.Builder {}
+
+ default void compiledAndUsable() {
+ WithMapUnary u = new ImmutableWithMapUnary.Builder()
+ .a(1)
+ .b("B")
+ .build();
+
+ // signatures exist after code generation and compilation
+ u = u.mapA(a -> a + 2).mapL(l -> l + "!!!").mapO(o -> o + "???");
+ }
}
