Skip to content

Commit 5b01aaf

Browse files
committed
Merge pull request scala#4120 from retronym/ticket/5665
SI-5665 Test case for fixed private[this], trait crasher
2 parents c70774c + 0a5ade5 commit 5b01aaf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/files/run/t5665.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
object O {
2+
trait T {
3+
private[this] val c: Int = 42
4+
def f =
5+
{ x: Int => c }
6+
}
7+
}
8+
9+
object Test {
10+
def main(args: Array[String]): Unit = {
11+
assert(new O.T{}.f(0) == 42)
12+
}
13+
}

0 commit comments

Comments
 (0)