Open TomasMikula opened 10 months ago
The stack trace seems to indicate that a type variable is (directly or indirectly) instantiated to itself.
Unfortunately the stacktrace does not tell us why and where that happens.
@TomasMikula do I understend correctly that it's a regression? Does it occur for versions earlier than 3.3.1? and yes, seems like we need a minimization for this.
Hi @Gedochao, no, I'm not saying that this is a regression. It is new code that I have written with 3.3.1, and then tested with newer pre-release versions to check if by any chance it was already resolved.
@odersky I have isolated a self-contained example (see the updated description). Surely it can be minimized further, but this is how far I got so far.
Thank you for producing the example! That should help.
Compiler version
3.3.1 3.3.2-RC3 3.4.0-RC4 3.4.1-RC1-bin-20240202-5850d2d-NIGHTLY
Self-contained code to reproduce
Original reproduction steps
(Apologies for not having a minimized example. Hoping someone would spot the bug just given the stack trace and code change that avoids/triggers the error.)
You can further edit
build.sbt
to use any of the above Scala versions.A workaround is to supply explicit type arguments in
OpenTypeExpr.scala
, line 147 (just uncomment them; see the diff triggering the error).Output (click arrow to expand)