summaryrefslogtreecommitdiff
path: root/test/files/run/t5665.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-09 19:11:08 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-09 19:15:09 +1000
commit0a5ade5b660e383d8af307eed88ab3513311b412 (patch)
tree266bc674d186e27a00604e61bb098acf9a399388 /test/files/run/t5665.scala
parentb431a4bd83d3bfb2b95d0426d2905b34ce1265ad (diff)
downloadscala-0a5ade5b660e383d8af307eed88ab3513311b412.tar.gz
scala-0a5ade5b660e383d8af307eed88ab3513311b412.tar.bz2
scala-0a5ade5b660e383d8af307eed88ab3513311b412.zip
SI-5665 Test case for fixed private[this], trait crasher
Fixed in SI-5508 / cca4d51db.
Diffstat (limited to 'test/files/run/t5665.scala')
-rw-r--r--test/files/run/t5665.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/t5665.scala b/test/files/run/t5665.scala
new file mode 100644
index 0000000000..3ac498b5c0
--- /dev/null
+++ b/test/files/run/t5665.scala
@@ -0,0 +1,13 @@
+object O {
+ trait T {
+ private[this] val c: Int = 42
+ def f =
+ { x: Int => c }
+ }
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ assert(new O.T{}.f(0) == 42)
+ }
+}