aboutsummaryrefslogtreecommitdiff
path: root/tests/run/i1820.scala
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2016-12-18 00:56:18 +0100
committerliu fengyun <liu@fengy.me>2016-12-18 00:57:02 +0100
commit152e4690edd3e5ad484519baccdf679cfa0919ed (patch)
tree33f71b3956d1a49da586915b63b64acf31d5d0d1 /tests/run/i1820.scala
parent5df985cc599a0c69029773e3416bbb5fc883476a (diff)
downloaddotty-152e4690edd3e5ad484519baccdf679cfa0919ed.tar.gz
dotty-152e4690edd3e5ad484519baccdf679cfa0919ed.tar.bz2
dotty-152e4690edd3e5ad484519baccdf679cfa0919ed.zip
fix #1820: make sure outer of traits implemented
Diffstat (limited to 'tests/run/i1820.scala')
-rw-r--r--tests/run/i1820.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run/i1820.scala b/tests/run/i1820.scala
new file mode 100644
index 000000000..bc4f63d9b
--- /dev/null
+++ b/tests/run/i1820.scala
@@ -0,0 +1,17 @@
+class A {
+ val a = "a"
+ trait Inner {
+ def f = println(a)
+ def h = 3
+ }
+}
+
+class Inner extends O.a.Inner
+
+object O {
+ val a = new A
+
+ def main(args: Array[String]): Unit = {
+ (new Inner).f
+ }
+}