diff options
-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) + } +} |