Closed
Description
Minimized code
enum T:
case N
case C(i: Int, t: T)
T.C(1, T.C(2, T.N))
Output
[error] | Exception occurred while executing macro expansion.
[error] | java.lang.StackOverflowError
Expectation
When this example is defined in a regular code, it works fine.
When used inside of a macro implementation, it causes StackOverflow.
Workaround is to replace case N
with case N()
or replace enum
with a sealed trait hierarchy.