Open lrytz opened 8 years ago
Here's another one:
@Test
def a(): Unit = {
val jCode = List("interface T { }" -> "T.java")
val code = "class C extends T"
compiler.compileClasses(code, jCode)
}
@Test
def b(): Unit = {
val jCode = List("interface A { }" -> "A.java")
val code =
"""trait T extends A
|class C extends T
""".stripMargin
compiler.compileClasses(code, jCode)
}
Optimistically closing that this was fixed in the rework that was https://github.com/scala/scala-partest/issues/75.
This ticket is not about partest, but JUnit tests that use BytecodeTesting
. There we use a single Global
instance and only create a new Run
per test. So the test failures are symptoms of bugs in the resident compiler.
Since both still reproduce, I re-open.
Individually they both run fine. When running them together (first eins, then zwei), we get
java.lang.AssertionError: assertion failed: The compiler issued non-allowed warnings or errors:
Perhaps due to adaptToNewRun not reverting/resetting flags (https://github.com/scala/scala/pull/9141#issuecomment-768353508).
The following two tests in
scala.tools.testkit.BytecodeTesting
:Individually they both run fine. When running them together (first eins, then zwei), we get
Renaming
B
toB1
in test zwei fixes the cross-talk. Possibly related to https://github.com/scala/scala/commit/59d6dbc.