From 8191c86cba985e9edb596fbd1a2190c02cf45e0b Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 8 Jun 2015 12:41:06 +0200 Subject: Copy annotations from trait members to their implementations Implementations inherit all annotations on the implemented trait methods. --- tests/pos/scala2traits/dotty-subclass.scala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/pos/scala2traits') diff --git a/tests/pos/scala2traits/dotty-subclass.scala b/tests/pos/scala2traits/dotty-subclass.scala index 4e162dd14..62720b993 100644 --- a/tests/pos/scala2traits/dotty-subclass.scala +++ b/tests/pos/scala2traits/dotty-subclass.scala @@ -1,7 +1,13 @@ // This is supposed to be compiled by Dotty class Sub extends T -class A extends S2T with S2Tprivate { +trait DT { + + @volatile lazy val dx = 2 + +} + +class A extends S2T with S2Tprivate with DT { val a: Int = 3 var b = 2 } -- cgit v1.2.3