Open
Description
Compiler version
3.7.0
(works in 3.6.4)
Minimized code
//> using scala 3.7.0
object Foo:
class Inner // moving Inner to external object fixes the error
opaque type Type = Inner
inline def of[A]: OfOps = new OfOps // type A is important here
class OfOps:
inline def apply(): Type = new Inner
@main def run: Unit = Foo.of()
Output
Compiler 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] For the unprocessed stack trace, compile with -Xno-enrich-error-messages.
[error] A recurring operation is (inner to outer):
[error]
[error] find-member Foo.Inner
[error] find-member Foo.Inner
[error] find-member Foo.Inner
[error] find-member Foo.Inner
[error] find-member Foo.Inner
[error] find-member Foo.Inner
[error] find-member Foo.Inner
Expectation
No compiler error