aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/t1569-failedAvoid.scala9
-rw-r--r--tests/pickling/default-param-interface.scala (renamed from tests/tasty/default-param-interface.scala)0
-rw-r--r--tests/pickling/i982.scala (renamed from tests/tasty/i982.scala)0
-rw-r--r--tests/pos-java-interop/varargsOverride/Base.java5
-rw-r--r--tests/pos-java-interop/varargsOverride/Sub.scala3
-rw-r--r--tests/pos/t1569.scala12
6 files changed, 20 insertions, 9 deletions
diff --git a/tests/neg/t1569-failedAvoid.scala b/tests/neg/t1569-failedAvoid.scala
deleted file mode 100644
index 45bb96f36..000000000
--- a/tests/neg/t1569-failedAvoid.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-// This was t1569.scala.
-// It fails in dotty because the expected type of the anonymous function in the last line
-// is fully determined (C). So that type is taken as the type of the anonymous function.
-// See pos/t1569a.scala for related examples that work.
-object Bug {
- class C { type T }
- def foo(x: Int)(y: C)(z: y.T): Unit = {}
- foo(3)(new C { type T = String })("hello") // error
-}
diff --git a/tests/tasty/default-param-interface.scala b/tests/pickling/default-param-interface.scala
index 919f4b627..919f4b627 100644
--- a/tests/tasty/default-param-interface.scala
+++ b/tests/pickling/default-param-interface.scala
diff --git a/tests/tasty/i982.scala b/tests/pickling/i982.scala
index 838b250d9..838b250d9 100644
--- a/tests/tasty/i982.scala
+++ b/tests/pickling/i982.scala
diff --git a/tests/pos-java-interop/varargsOverride/Base.java b/tests/pos-java-interop/varargsOverride/Base.java
new file mode 100644
index 000000000..a4607b71c
--- /dev/null
+++ b/tests/pos-java-interop/varargsOverride/Base.java
@@ -0,0 +1,5 @@
+class Base {
+ public Object foo(Object... x) {
+ return x;
+ }
+}
diff --git a/tests/pos-java-interop/varargsOverride/Sub.scala b/tests/pos-java-interop/varargsOverride/Sub.scala
new file mode 100644
index 000000000..9d3e2bf0d
--- /dev/null
+++ b/tests/pos-java-interop/varargsOverride/Sub.scala
@@ -0,0 +1,3 @@
+class Sub extends Base {
+ override def foo(x: Object*): Object = x
+}
diff --git a/tests/pos/t1569.scala b/tests/pos/t1569.scala
new file mode 100644
index 000000000..a2fbcf11f
--- /dev/null
+++ b/tests/pos/t1569.scala
@@ -0,0 +1,12 @@
+// See pos/t1569a.scala for related examples that work.
+object Bug {
+ class C { type T }
+ def foo(x: Int)(y: C)(z: y.T): Unit = {}
+ foo(3)(new C { type T = String })("hello")
+}
+object Bug2 {
+ class C { type T }
+ class D extends C { type T = String }
+ def foo(x: Int)(y: C)(z: y.T): Unit = {}
+ foo(3)(new D {})("hello")
+}