-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:inlinearea:opaque-typesitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat:fixed in nightlyThis issue may be present in the latest stable or RC version of Next, but has been since fixed.This issue may be present in the latest stable or RC version of Next, but has been since fixed.
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
Metadata
Metadata
Assignees
Labels
area:inlinearea:opaque-typesitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat:fixed in nightlyThis issue may be present in the latest stable or RC version of Next, but has been since fixed.This issue may be present in the latest stable or RC version of Next, but has been since fixed.