diff options
Diffstat (limited to 'tests/pos/typers.scala')
-rw-r--r-- | tests/pos/typers.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pos/typers.scala b/tests/pos/typers.scala index c3101ea2c..fd2cc9b74 100644 --- a/tests/pos/typers.scala +++ b/tests/pos/typers.scala @@ -63,5 +63,20 @@ object typers { class Refinements { val y: C { type T; val key: T; def process(x: T): Int } } + + object Accessibility { + + class A { + val x: String = "abc" + } + + class B extends A { + private def x: Int = 1 + } + + val b: B = new B + val y = b.x + + } }
\ No newline at end of file |