mirror of https://github.com/sbt/sbt.git
Test for #1031
This commit is contained in:
parent
c669606999
commit
90143986e4
|
|
@ -1 +1,12 @@
|
||||||
libraryDependencies += "org.scala-sbt" % "sbt" % sbtVersion.value
|
libraryDependencies += "org.scala-sbt" % "sbt" % sbtVersion.value
|
||||||
|
|
||||||
|
|
||||||
|
lazy val expectErrorNotCrash = taskKey[Unit]("Ensures that sbt properly set types on Trees so that the compiler doesn't crash on a bad reference to .value, but gives a proper error instead.")
|
||||||
|
|
||||||
|
expectErrorNotCrash := {
|
||||||
|
val fail = (compile in Compile).failure.value
|
||||||
|
fail.directCause match {
|
||||||
|
case Some(x: xsbti.CompileFailed) => ()
|
||||||
|
case _ => error("Compiler crashed instead of providing a compile-time-only exception.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ $ copy-file changes/A1.scala A.scala
|
||||||
> compile
|
> compile
|
||||||
|
|
||||||
$ copy-file changes/A2.scala A.scala
|
$ copy-file changes/A2.scala A.scala
|
||||||
-> compile
|
> expectErrorNotCrash
|
||||||
|
|
||||||
$ copy-file changes/A3.scala A.scala
|
$ copy-file changes/A3.scala A.scala
|
||||||
-> compile
|
> expectErrorNotCrash
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue