com-lihaoyi/utest

lazy vals crash compiler

japgolly opened this issue · 1 comments

Yo. It seems lazy vals within tests crash scalac.
It happens when compiling for JVM and JS.

Reproduction:

object What { def mf1 = 2 }
object SomeTest extends TestSuite {
  override def tests = TestSuite {
    import What._
    lazy val subj = mf1
  }
}

You can see big error messages if you want in scala-js/scala-js#1580

This should be fixed in Scala 2.12.x in 36c2c3d, enforced in c1799d2