mirror of https://github.com/sbt/sbt.git
Pending test case for abstract type override flag (#726)
This test case demonstrates spurious recompilation described in #726.
This commit is contained in:
parent
7689343ba0
commit
e97a7ac228
|
|
@ -0,0 +1,7 @@
|
|||
InputKey[Unit]("check-number-of-compiler-iterations") <<= inputTask { (argTask: TaskKey[Seq[String]]) =>
|
||||
(argTask, compile in Compile) map { (args: Seq[String], a: sbt.inc.Analysis) =>
|
||||
assert(args.size == 1)
|
||||
val expectedIterationsNumber = args(0).toInt
|
||||
assert(a.compilations.allCompilations.size == expectedIterationsNumber, "a.compilations.allCompilations.size = %d (expected %d)".format(a.compilations.allCompilations.size, expectedIterationsNumber))
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
object Bar {
|
||||
def bar: Outer.TypeInner = null
|
||||
// comment to trigger recompilation
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# Test for separate compilation and proper value of
|
||||
# the OVERRIDE flag when abstract types, type alias
|
||||
# and structural type are involved
|
||||
# See https://github.com/sbt/sbt/issues/726 for details
|
||||
|
||||
# introduces first compile iteration
|
||||
> compile
|
||||
# this change adds a comment and does not change api so introduces
|
||||
# only one additional compile iteration
|
||||
$ copy-file changes/Bar1.scala src/main/scala/Bar.scala
|
||||
# second iteration
|
||||
#> compile
|
||||
# check if there are only two compile iterations performed
|
||||
> check-number-of-compiler-iterations 2
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
object Bar {
|
||||
def bar: Outer.TypeInner = null
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
object Outer {
|
||||
class Inner { type Xyz }
|
||||
|
||||
type TypeInner = Inner { type Xyz = Int }
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
class Impl {
|
||||
def bleep = Bar.bar
|
||||
}
|
||||
Loading…
Reference in New Issue