diff options
author | Martin Odersky <odersky@gmail.com> | 2007-01-10 19:41:00 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-01-10 19:41:00 +0000 |
commit | cfb8a3bb3e7f881a9d76c990d0a641683f187e71 (patch) | |
tree | af7cfe644e3f649c2fc57b0c421ef2afff1bd884 /test | |
parent | d1d980fd2b51304c504bff2529378a31b1ad91e9 (diff) | |
download | scala-cfb8a3bb3e7f881a9d76c990d0a641683f187e71.tar.gz scala-cfb8a3bb3e7f881a9d76c990d0a641683f187e71.tar.bz2 scala-cfb8a3bb3e7f881a9d76c990d0a641683f187e71.zip |
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/bug874.check | 4 | ||||
-rw-r--r-- | test/files/run/bug874.scala | 22 |
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) + } +} |