summaryrefslogtreecommitdiff
path: root/test/files/run/t8575.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-02-26 09:57:15 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-02-26 09:57:15 +1000
commitab3f78a3f4e060832cc8360c00d9293928026eca (patch)
tree9cec1e7fbd08a1dcc3c2506fab1d00dd4eadf751 /test/files/run/t8575.scala
parent198c201590d8ab25b0474bf68266714a7542a37d (diff)
downloadscala-ab3f78a3f4e060832cc8360c00d9293928026eca.tar.gz
scala-ab3f78a3f4e060832cc8360c00d9293928026eca.tar.bz2
scala-ab3f78a3f4e060832cc8360c00d9293928026eca.zip
SI-8575 Avoid use of unitialized field in a test.
The checkinit build has been failing in the 2.12.x branch. This commit modifies the errant test case to avoid using an unitialized field. I have verified that the new test still faithfully demonstrates the original bug. ``` % scalac-hash v2.11.0 test/files/run/t8575.scala && scala-hash v2.11.0 Test java.lang.AbstractMethodError: Test$.consume(Ljava/lang/Object;)V ```
Diffstat (limited to 'test/files/run/t8575.scala')
-rw-r--r--test/files/run/t8575.scala5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/files/run/t8575.scala b/test/files/run/t8575.scala
index 6e3e57f2be..fb8f603f3e 100644
--- a/test/files/run/t8575.scala
+++ b/test/files/run/t8575.scala
@@ -21,13 +21,12 @@ object Test extends TypeMember {
// works if replaced by type X = E[A with B with C]
type X = E[F with C]
- val value = new E[F with C]
+ def value = new E[F with C]
// This call passes, since it invokes consume(E): Unit
- consume(value)
def consume(x: X) {}
def main(args: Array[String]) {
-
+ consume(value)
}
}