From dc9effeb3af789d9e4a6b8e126ac73ac718270fa Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 16 Mar 2016 16:14:27 +1000 Subject: Remove manual mixins in JFunctionN. These manual mixins were forwarding to the impl classes have just been removed. We can now rely on default methods instead. Update Tests: - Fix test/files/pos/t1237.scala, we can't have an outer field in an interface, always use the outer method. - Don't crash on meaningless trait early init fields test/files/neg/t2796.scala - Remove impl class relate parts of inner class test - Remove impl class relate parts of elidable test - Remove impl class related reflection test. - Remove test solely about trait impl classes renaming - Update check file with additional stub symbol error - Disable unstable parts of serialization test. - TODO explain, and reset the expectation --- test/files/run/trait-clonable.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/files/run/trait-clonable.scala (limited to 'test/files/run/trait-clonable.scala') diff --git a/test/files/run/trait-clonable.scala b/test/files/run/trait-clonable.scala new file mode 100644 index 0000000000..5be59d2586 --- /dev/null +++ b/test/files/run/trait-clonable.scala @@ -0,0 +1,11 @@ +// minimization of failure in run/t4813.scala related to the special +// case for default methods that override methods owned by Object.class in +// Java interfaces. +trait C[A >: Null <: AnyRef] { override def clone(): A = null } +trait X extends C[X] +class D extends X { def foo = (this: X).clone() } +object Test { + def main(args: Array[String]) { + assert(new D().foo == null) + } +} -- cgit v1.2.3