`Cyclic reference involving module class` in Scala3 but compiles in Scala2
See original GitHub issueCompiler version
3.0.0-RC1, 3.0.0-RC2
Minimized code
https://scastie.scala-lang.org/6NSAUSm4Qo2Y9NJbLQrxWw
Output
Cyclic reference involving module class JsonReaderDefaultValue$
Expectation
Successful compilation.
Does not reproduce when dependent code is copy-pasted to the same Scastie session.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
illegal cyclic reference involving class · Issue #3809 · scala/bug
One of my concerns is that I might be allowing something to compile, but to miscompile. The code is behind a -Y option...
Read more >Illegal cyclic reference involving class - scala - Stack Overflow
This gives me a compile error "illegal cyclic reference involving class myClass". The error goes away if I declare myClass as
Read more >Scala example source code file (Types.scala) - Alvin Alexander
This example Scala source code file (Types.scala) is included in my "Source Code Warehouse" project. The intent of this project is to help...
Read more >Scala Compiler Options
The Scala compiler scalac offers various compiler options, or flags, ... In Scala 2, default paths can be listed by running a tool...
Read more >sbt Reference Manual — Combined Pages
Starts the Scala REPL with project classes and dependencies on the classpath ... with a classpath including the compiled sources and all dependencies....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Self-contained:
JsonReaderDefaultValue.scala (compile with Scala 2.13)
Test.scala
If you can’t minimize it, it can still be helpful to open an issue if you can provide a reliably way to reproduce the problem (e.g. a branch of a git repo and the command used to compile the code).