diff options
author | Martin Odersky <odersky@gmail.com> | 2015-06-08 12:41:06 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-06-08 12:41:06 +0200 |
commit | 8191c86cba985e9edb596fbd1a2190c02cf45e0b (patch) | |
tree | 6a73fec576f2b82455ecbcf6b18d505b5b685484 /tests | |
parent | 674e6bb0ed9ab7a45bf0016585c2c020eb50351b (diff) | |
download | dotty-8191c86cba985e9edb596fbd1a2190c02cf45e0b.tar.gz dotty-8191c86cba985e9edb596fbd1a2190c02cf45e0b.tar.bz2 dotty-8191c86cba985e9edb596fbd1a2190c02cf45e0b.zip |
Copy annotations from trait members to their implementations
Implementations inherit all annotations on the implemented trait methods.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/scala2traits/dotty-subclass.scala | 8 |
1 files changed, 7 insertions, 1 deletions
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 } |