sviperll / adt4j

adt4j - Algebraic Data Types for Java
BSD 3-Clause "New" or "Revised" License
143 stars 8 forks source link

Allow recursive definitions without special type variables. #34

Closed sviperll closed 8 years ago

sviperll commented 8 years ago

Allow to declare list type like this without any additional troubles:

@GenerateValueClassForVisitor
@Visitor(resultVariableName="R")
interface ListVisitor<T, R> {
    R nil();
    R cons(T head, List<T> tail); // Here List is a newly generated class
}
sviperll commented 8 years ago

It's done, but there is still a javac bug that prevents it from working in all cases...