roc-lang / roc

A fast, friendly, functional language.
https://roc-lang.org
Universal Permissive License v1.0
4.46k stars 313 forks source link

Stack overflow for mutually recursive type aliases #3996

Open rtfeldman opened 2 years ago

rtfeldman commented 2 years ago

To reproduce, add these type aliases to a roc program, or the repl:

Tool : [X, FromJob Job]
Job : [Job Tool (List Job)]

For example:

  The rockin’ roc repl
────────────────────────

Enter an expression, or :help, or :q to quit.

» Tool : [X, FromJob Job]
… Job : [Job Tool (List Job)]
… {}

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Abort trap: 6
ayazhafiz commented 2 years ago

I think this is a duplicate of https://github.com/roc-lang/roc/issues/3216