Expand `pkg-self` scripted test to cover #2326

The previous version of `pkg-self` covered scenario where a package object
inherited directly from a class that is being modified and recompiled in
subsequent steps. The #2326 shows that name hashing fails to handle
a package object that inherits indirectly from a modified class. In that
case, name hashing fails to invalidate the source file that defines the
package object.
This commit expands `pkg-self` with a class B that inherits from modified
class `A` and makes package object inherit from B. We mark that test as
pending to show that this indeed trigger the bug in name hashing.
This commit is contained in:
Grzegorz Kossakowski 2016-02-01 19:14:44 +01:00
parent 14dcca6a31
commit c8bf46e893
4 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,3 @@
package demo
package demo.sub
object B {
3.y
}
class B extends A

View File

@ -0,0 +1,5 @@
package demo
object D {
3.y
}

View File

@ -1,3 +1,3 @@
package object demo extends sub.A {
package object demo extends sub.B {
val y = 9
}

View File

@ -1,8 +1,9 @@
# Here we have a package object (demo) that extends a class in a subpackage (demo.sub.A)
# demo.sub.A provides an implicit used by demo.B
# demo.sub.A provides an implicit used by demo.D
$ copy-file changes/package.scala src/main/scala/demo/package.scala
$ copy-file changes/A1.scala src/main/scala/demo/sub/A.scala
$ copy-file changes/B.scala src/main/scala/demo/B.scala
$ copy-file changes/C.scala src/main/scala/demo/C.scala
> compile
# When recompiling A, we delete the class files for A