diff options
author | James Iry <jamesiry@gmail.com> | 2013-05-31 13:44:34 -0700 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-05-31 13:44:34 -0700 |
commit | c1cd65bb5276b715141df6d09fc95b0c44d2b4c2 (patch) | |
tree | 2d4c2649a0decc2e19dfde0feab6181b6ebe3b56 /test | |
parent | 21e69fab18dcc0106dbec124e093144ce367f9c5 (diff) | |
parent | 801720b65173d692174cf8303ef481306c12b7f4 (diff) | |
download | scala-c1cd65bb5276b715141df6d09fc95b0c44d2b4c2.tar.gz scala-c1cd65bb5276b715141df6d09fc95b0c44d2b4c2.tar.bz2 scala-c1cd65bb5276b715141df6d09fc95b0c44d2b4c2.zip |
Merge pull request #2613 from retronym/ticket/6309
SI-6309 Test case for early-init / private[this] crasher.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t6309.check | 1 | ||||
-rw-r--r-- | test/files/run/t6309.scala | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/t6309.check b/test/files/run/t6309.check new file mode 100644 index 0000000000..7f8f011eb7 --- /dev/null +++ b/test/files/run/t6309.check @@ -0,0 +1 @@ +7 diff --git a/test/files/run/t6309.scala b/test/files/run/t6309.scala new file mode 100644 index 0000000000..7bbca63c2a --- /dev/null +++ b/test/files/run/t6309.scala @@ -0,0 +1,16 @@ +trait A { + def a: Int +} + +object Test { + def f(a: Int) = new { + //private val b = a + private[this] val b = a // crashes, sorry scalac + } with A { + def a = b + } + + def main(args: Array[String]) { + println(f(7).a) + } +} |