From 0e0614c866526d8922a34e3aab1afc64d7b4f01c Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Fri, 30 Sep 2016 15:41:03 +0200 Subject: Default -Xmixin-force-forwarders to true Also eliminates the warning when a mixin forwarder cannot be implemented because the target method is a java-defined default method in an interface that is not a direct parent of the class. The test t5148 is moved to neg, as expected: It was moved to pos when disabling mixin forwarders in 33e7106. Same for the changed error message in t4749. --- test/files/neg/t4749.check | 2 +- test/files/neg/t5148.check | 16 ++++++++++++++++ test/files/neg/t5148.scala | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 test/files/neg/t5148.check create mode 100644 test/files/neg/t5148.scala (limited to 'test/files/neg') diff --git a/test/files/neg/t4749.check b/test/files/neg/t4749.check index 6bd2550097..3539140954 100644 --- a/test/files/neg/t4749.check +++ b/test/files/neg/t4749.check @@ -26,7 +26,7 @@ t4749.scala:26: warning: Fail6 has a main method with parameter type Array[Strin object Fail6 { ^ t4749.scala:42: warning: Win3 has a main method with parameter type Array[String], but bippy.Win3 will not be a runnable program. - Reason: main methods cannot refer to type parameters or abstract types. + Reason: main method must have exact signature (Array[String])Unit object Win3 extends WinBippy[Unit] { } ^ error: No warnings can be incurred under -Xfatal-warnings. diff --git a/test/files/neg/t5148.check b/test/files/neg/t5148.check new file mode 100644 index 0000000000..1f58c235ce --- /dev/null +++ b/test/files/neg/t5148.check @@ -0,0 +1,16 @@ +error: missing or invalid dependency detected while loading class file 'Imports.class'. +Could not access term memberHandlers in class scala.tools.nsc.interpreter.IMain, +because it (or its dependencies) are missing. Check your build definition for +missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) +A full rebuild may help if 'Imports.class' was compiled against an incompatible version of scala.tools.nsc.interpreter.IMain. +error: missing or invalid dependency detected while loading class file 'Imports.class'. +Could not access type Wrapper in class scala.tools.nsc.interpreter.IMain.Request, +because it (or its dependencies) are missing. Check your build definition for +missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) +A full rebuild may help if 'Imports.class' was compiled against an incompatible version of scala.tools.nsc.interpreter.IMain.Request. +error: missing or invalid dependency detected while loading class file 'Imports.class'. +Could not access type Request in class scala.tools.nsc.interpreter.IMain, +because it (or its dependencies) are missing. Check your build definition for +missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) +A full rebuild may help if 'Imports.class' was compiled against an incompatible version of scala.tools.nsc.interpreter.IMain. +three errors found diff --git a/test/files/neg/t5148.scala b/test/files/neg/t5148.scala new file mode 100644 index 0000000000..fca64e57df --- /dev/null +++ b/test/files/neg/t5148.scala @@ -0,0 +1,4 @@ +package scala.tools.nsc +package interpreter + +class IMain extends Imports -- cgit v1.2.3