Closed
Description
minimized code
With dotty 0.17.0-RC1
// This code produces the compiler error below
val Names = IArray(
"Aaliyah",
"Aaron",
// ... 5000 more names as string literals
)
// This code triggers the same compile error
val Names: IArray[String] = IArray(/* 5000 names */)
// This code compiles successfully
val Names = IArray[String](/* 5000 names */)
[error] 2 |val Names = IArray(
[error] | ^
[error] |Recursion limit exceeded.
[error] |Maybe there is an illegal cyclic reference?
[error] |If that's not the case, you could also try to increase the stacksize using the -Xss JVM option.
[error] |A recurring operation is (inner to outer):
[error] |
[error] | subtype ... | ... | ... | ...(...) | ...(...) | String("Winnie") | String("Winnifred") |
[error] |
[error] |String("Winona") | String("Winston") | String("Winter") | String("Wm") |
[error] | String("Wonda")
expectation
Expected this code to compile:
IArray("Aaliyah", "Aaron", /* 5000 more names */)```