aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/dotc/tests.scala1
-rw-r--r--tests/disabled/java-interop/pos/t0695/JavaClass.java5
-rw-r--r--tests/disabled/java-interop/pos/t0695/Test.scala3
-rw-r--r--tests/neg/t0654.scala5
-rw-r--r--tests/pending/pos/t0625.scala (renamed from tests/untried/pos/t0625.scala)0
-rw-r--r--tests/pos/ostermann.scala3
-rw-r--r--tests/pos/t0301.scala12
-rw-r--r--tests/pos/t0304.scala5
-rw-r--r--tests/pos/t0305.scala7
-rw-r--r--tests/pos/t0453.scala6
-rw-r--r--tests/pos/t0586.scala (renamed from tests/untried/pos/t0586.scala)0
-rw-r--r--tests/pos/t0599.scala (renamed from tests/untried/pos/t0599.scala)0
-rw-r--r--tests/pos/t0644.scala (renamed from tests/untried/pos/t0644.scala)0
-rw-r--r--tests/pos/t0674.scala (renamed from tests/untried/pos/t0674.scala)0
-rw-r--r--tests/untried/pos/t0654.scala5
15 files changed, 47 insertions, 5 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index 15d7432ab..ee05dd15c 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -62,6 +62,7 @@ class tests extends CompilerTest {
@Test def neg_companions = compileFile(negDir, "companions", xerrors = 1)
@Test def neg_autoTupling = compileFile(posDir, "autoTuplingTest", "-language:noAutoTupling" :: Nil, xerrors = 3)
@Test def neg_autoTupling2 = compileFile(negDir, "autoTuplingTest", xerrors = 3)
+ @Test def neg_t0654_polyalias = compileFile(negDir, "t0654", xerrors = 2)
@Test def dotc = compileDir(dotcDir + "tools/dotc", twice)
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast", twice)
diff --git a/tests/disabled/java-interop/pos/t0695/JavaClass.java b/tests/disabled/java-interop/pos/t0695/JavaClass.java
new file mode 100644
index 000000000..a765f7e32
--- /dev/null
+++ b/tests/disabled/java-interop/pos/t0695/JavaClass.java
@@ -0,0 +1,5 @@
+public class JavaClass<A> {
+ class InnerClass {
+ public A method() { return null; }
+ }
+}
diff --git a/tests/disabled/java-interop/pos/t0695/Test.scala b/tests/disabled/java-interop/pos/t0695/Test.scala
new file mode 100644
index 000000000..7318867bf
--- /dev/null
+++ b/tests/disabled/java-interop/pos/t0695/Test.scala
@@ -0,0 +1,3 @@
+object Test extends JavaClass[AnyRef] {
+ var field: InnerClass = null
+}
diff --git a/tests/neg/t0654.scala b/tests/neg/t0654.scala
new file mode 100644
index 000000000..52dbbb014
--- /dev/null
+++ b/tests/neg/t0654.scala
@@ -0,0 +1,5 @@
+object Test {
+ class Foo[T]
+ type C[T] = Foo[_ <: T] // error: parameter type T of type alias does not appear as type argument of the aliased class Foo
+ val a: C[AnyRef] = new Foo[AnyRef] // follow-on error: wrong number of type arguments for Test.C, should be 0
+}
diff --git a/tests/untried/pos/t0625.scala b/tests/pending/pos/t0625.scala
index 561454259..561454259 100644
--- a/tests/untried/pos/t0625.scala
+++ b/tests/pending/pos/t0625.scala
diff --git a/tests/pos/ostermann.scala b/tests/pos/ostermann.scala
new file mode 100644
index 000000000..f3acafc72
--- /dev/null
+++ b/tests/pos/ostermann.scala
@@ -0,0 +1,3 @@
+trait A { def foo(a: A) : Unit }
+
+trait C extends A { override def foo(a: A with Any) : Unit }
diff --git a/tests/pos/t0301.scala b/tests/pos/t0301.scala
new file mode 100644
index 000000000..24b477601
--- /dev/null
+++ b/tests/pos/t0301.scala
@@ -0,0 +1,12 @@
+package fos
+
+abstract class Expr
+case class Var() extends Expr
+
+object Analyzer {
+ def substitution(expr: Expr, cls: (Var,Var)): Expr =
+ expr match {
+ case cls._2 => cls._1 // source of the error
+ case _ => expr
+ }
+}
diff --git a/tests/pos/t0304.scala b/tests/pos/t0304.scala
new file mode 100644
index 000000000..607a115db
--- /dev/null
+++ b/tests/pos/t0304.scala
@@ -0,0 +1,5 @@
+object O {
+ def f1 = -1;
+ def f2 = 0-1;
+ def f3 = f1 + f2;
+}
diff --git a/tests/pos/t0305.scala b/tests/pos/t0305.scala
new file mode 100644
index 000000000..4838b1fcf
--- /dev/null
+++ b/tests/pos/t0305.scala
@@ -0,0 +1,7 @@
+object Test extends App {
+
+ def foo(is:Int*) = 1;
+ def foo(i:Int) = 2;
+
+ assert(foo( List(3):_* ) == 1)
+}
diff --git a/tests/pos/t0453.scala b/tests/pos/t0453.scala
new file mode 100644
index 000000000..dfacc5eed
--- /dev/null
+++ b/tests/pos/t0453.scala
@@ -0,0 +1,6 @@
+object Test {
+ val foo = new {
+ trait Bar
+ def l () : Bar = { new Bar {} }
+ }
+}
diff --git a/tests/untried/pos/t0586.scala b/tests/pos/t0586.scala
index 540e225a1..540e225a1 100644
--- a/tests/untried/pos/t0586.scala
+++ b/tests/pos/t0586.scala
diff --git a/tests/untried/pos/t0599.scala b/tests/pos/t0599.scala
index 885159af6..885159af6 100644
--- a/tests/untried/pos/t0599.scala
+++ b/tests/pos/t0599.scala
diff --git a/tests/untried/pos/t0644.scala b/tests/pos/t0644.scala
index e51ec7df5..e51ec7df5 100644
--- a/tests/untried/pos/t0644.scala
+++ b/tests/pos/t0644.scala
diff --git a/tests/untried/pos/t0674.scala b/tests/pos/t0674.scala
index 589eeec9f..589eeec9f 100644
--- a/tests/untried/pos/t0674.scala
+++ b/tests/pos/t0674.scala
diff --git a/tests/untried/pos/t0654.scala b/tests/untried/pos/t0654.scala
deleted file mode 100644
index 07b4e7279..000000000
--- a/tests/untried/pos/t0654.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-object Test {
- class Foo[T]
- type C[T] = Foo[_ <: T]
- val a: C[AnyRef] = new Foo[AnyRef]
-}