aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/partialApplications.scala11
-rw-r--r--tests/neg/selfreq.scala8
2 files changed, 4 insertions, 15 deletions
diff --git a/tests/neg/partialApplications.scala b/tests/neg/partialApplications.scala
deleted file mode 100644
index 67f6cf059..000000000
--- a/tests/neg/partialApplications.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-object Test {
-
- type RMap[X, Y] = Map[Y, X]
- val m = Map[Int, String]()
- val ts: RMap[_, Int] = m // erorr // error
- val us: RMap[String, _] = m // error // error
- val vs: RMap[_, _] = m // error // error // error
- val zz: RMap = m // error
-
-}
-
diff --git a/tests/neg/selfreq.scala b/tests/neg/selfreq.scala
index e75e03c16..ff5725bf2 100644
--- a/tests/neg/selfreq.scala
+++ b/tests/neg/selfreq.scala
@@ -1,8 +1,8 @@
-trait X { self: Y =>
+trait X { self: Y => // error: cannot resolve reference to type (Y & X)(X.this).V
type T <: self.U
- def foo(x: T): T
+ def foo(x: T): T // error: cannot resolve reference to type (Y & X)(X.this).V
def foo(x: String): String
}
@@ -21,14 +21,14 @@ trait Z {
object O {
val x: X = ???
- x.foo("a")
+ x.foo("a") // error: cannot resolve reference to type (Y & X)(X.this).V
}
import scala.tools.nsc.interpreter.IMain
object Test extends dotty.runtime.LegacyApp {
val engine = new IMain.Factory getScriptEngine()
- engine.asInstanceOf[IMain].settings.usejavacp.value = true
+ engine.asInstanceOf[IMain].settings.usejavacp.value = true // no longer an error since we unpickle Scala2 inner classes with fixed syms
val res2 = engine.asInstanceOf[javax.script.Compilable]
res2 compile "8" eval()
val res5 = res2 compile """println("hello") ; 8"""