We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given the following two Scala source files (located in separate directories) :
// src\main\scala\Main.scala object JSON { sealed trait Json final case class JArray(elems: JValue*) extends Json type JValue = Number | JArray } object Main extends App { println(JSON.JArray(1)) }
// src\test\scala\MainTest.scala object MainTest extends App { println(JSON.JArray(1)) }
Compilation (and execution) of Main.scala works as expected; (separate) compilation of MainTest.scala fails.
Main.scala
MainTest.scala
$ dotc -version Dotty compiler version 0.26.0-bin-20200710-a162b7b-NIGHTLY-git-a162b7b -- Copyright 2002-2020, LAMP/EPFL $ mkdir target\classes target\test-classes $ dotc -d target\classes src\main\scala\Main.scala $ dotr -cp target\classes Main JArray(ArraySeq(1)) $ dotc -classpath target\classes -d target\test-classes src\test\scala\MainTest.scala -- [E046] Cyclic Error: src\test\scala\MainTest.scala:2:15 --------------------- 2 | println(JSON.JArray(1)) | ^ | Cyclic reference involving trait Seq longer explanation available when compiling with `-explain` 1 error found
NB. Java SDK is jdk-1.8.0_252-b09. The same error occurs with previous versions of Dotty (e.g. 0.25.0-RC2 or 0.24.0-RC1).
jdk-1.8.0_252-b09
0.25.0-RC2
0.24.0-RC1
Separate compilation succeeds (and Main and MainTest print the same result).
Main
MainTest
The text was updated successfully, but these errors were encountered:
This seems to have been fixed by #9618.
Sorry, something went wrong.
Add regression test for scala#9355
e24bb31
Confirmed.
Merge pull request #10962 from griggt/fix-#9355
3ff6678
Fix #9355: Add regression test
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
Minimized code
Given the following two Scala source files (located in separate directories) :
Output
Compilation (and execution) of
Main.scala
works as expected; (separate) compilation ofMainTest.scala
fails.NB. Java SDK is
jdk-1.8.0_252-b09
. The same error occurs with previous versions of Dotty (e.g.0.25.0-RC2
or0.24.0-RC1
).Expectation
Separate compilation succeeds (and
Main
andMainTest
print the same result).The text was updated successfully, but these errors were encountered: