summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/files/run/bug874.check4
-rw-r--r--test/files/run/bug874.scala22
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/bug874.check b/test/files/run/bug874.check
new file mode 100644
index 0000000000..6989e47ff5
--- /dev/null
+++ b/test/files/run/bug874.check
@@ -0,0 +1,4 @@
+T created
+U created with xyz and 2
+T created
+U created with abc and 1
diff --git a/test/files/run/bug874.scala b/test/files/run/bug874.scala
new file mode 100644
index 0000000000..945a5bf620
--- /dev/null
+++ b/test/files/run/bug874.scala
@@ -0,0 +1,22 @@
+object Test {
+ abstract class Base {
+ type T;
+ def T : T;
+ def U[A](x1: A)(x2: int): Any
+ T;
+ U("xyz")(2)
+ }
+ class Mix extends Base {
+ case class T {
+ Console.println("T created")
+ }
+ case class U[A](x1: A)(x2: int) {
+ Console.println("U created with "+x1+" and "+x2)
+ }
+ }
+ def main(args : Array[String]) : Unit = {
+ val obvious: Base = new Mix;
+ obvious.T
+ obvious.U("abc")(1)
+ }
+}