diff options
Diffstat (limited to 'tests/pos/superacc.scala')
-rw-r--r-- | tests/pos/superacc.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/superacc.scala b/tests/pos/superacc.scala new file mode 100644 index 000000000..91397003d --- /dev/null +++ b/tests/pos/superacc.scala @@ -0,0 +1,17 @@ +// scenario one: supercalls in traits +abstract class C { + def foo: Int = 2 + def baz: Int = 2 +} + +trait T extends C { + override def foo = super.foo + 1 +} + + +// scenario 2: supercalls in nested classes +class D extends C with T { + class I { + val x= D.super.baz + } +} |