diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-11-09 19:11:08 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-11-09 19:15:09 +1000 |
commit | 0a5ade5b660e383d8af307eed88ab3513311b412 (patch) | |
tree | 266bc674d186e27a00604e61bb098acf9a399388 /test/files | |
parent | b431a4bd83d3bfb2b95d0426d2905b34ce1265ad (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/t5665.scala | 13 |
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) + } +} |