-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Allow definitions like this:
interface SomeVisitor<T, R> {
<U extends Callable<T> & Serializable> R callable(U callable);
R immediate(T value);
}
So we can write
int eval(SomeValue<Integer> value) {
return value.accept(new SomeVisitor<Integer, Integer>() {
<U extends Callable<Integer> & Serializable> Integer callable(U callable) {
return callable.call();
}
Integer immediate(Integer value) {
return value;
}
});
}
This will pave the way to GADT support #15
Metadata
Metadata
Assignees
Labels
No labels