diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-03-13 16:23:05 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-03-13 16:23:05 +0100 |
commit | daffba9de6176ab75f292e2281aec87d5bb23124 (patch) | |
tree | 3b81e96c2b04cbabb469f711cb7dfe1264701620 /tests | |
parent | e68d68414fa346fad9dee204746d826ee172e861 (diff) | |
parent | 6b983e39ff7880994c6edfec7e79a151f83e83f3 (diff) | |
download | dotty-daffba9de6176ab75f292e2281aec87d5bb23124.tar.gz dotty-daffba9de6176ab75f292e2281aec87d5bb23124.tar.bz2 dotty-daffba9de6176ab75f292e2281aec87d5bb23124.zip |
Merge pull request #1164 from dotty-staging/fix-#1140
Make sure lazy accessors in traits are not private.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/i1140/A_1.scala | 4 | ||||
-rw-r--r-- | tests/run/i1140/B_2.scala | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/run/i1140/A_1.scala b/tests/run/i1140/A_1.scala new file mode 100644 index 000000000..e16a8162d --- /dev/null +++ b/tests/run/i1140/A_1.scala @@ -0,0 +1,4 @@ +trait A { + val foo = 0 + x + private lazy val x = 1 +} diff --git a/tests/run/i1140/B_2.scala b/tests/run/i1140/B_2.scala new file mode 100644 index 000000000..aa576c256 --- /dev/null +++ b/tests/run/i1140/B_2.scala @@ -0,0 +1,5 @@ +object Test extends A { + def main(args: Array[String]): Unit = { + assert(foo == 1) + } +} |