sviperll / adt4j

adt4j - Algebraic Data Types for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Usage of varargs generates non-varargs constructor

talios opened this issue · comments

Here's an interesting one I just hit, when using varargs in a ADT method:

R composite(String name, S... fields);

The constructor method is generated as:

R composite(String name, S[] fields);

There is the question around if modelling this particular use case with varargs is good/bad, but I think the generated code should match at least.

I agree that generated code should match declaration. I'll look into it. Thanks for feedback.

Should work in master now:

0a79e30