diff options
author | Martin Odersky <odersky@gmail.com> | 2006-05-30 10:47:58 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-05-30 10:47:58 +0000 |
commit | f7a989f23a40541d6f2b6de88dca3c55e6d7376f (patch) | |
tree | 4c86eb89b85ebfebc0f458b3efbb68df668b68d7 /test/files/pos/bug319.scala | |
parent | 335de89b823ac04008aab6a05569d1097068e6cf (diff) | |
download | scala-f7a989f23a40541d6f2b6de88dca3c55e6d7376f.tar.gz scala-f7a989f23a40541d6f2b6de88dca3c55e6d7376f.tar.bz2 scala-f7a989f23a40541d6f2b6de88dca3c55e6d7376f.zip |
fixed bugs615 and 617
Diffstat (limited to 'test/files/pos/bug319.scala')
-rwxr-xr-x | test/files/pos/bug319.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/pos/bug319.scala b/test/files/pos/bug319.scala new file mode 100755 index 0000000000..eed25eb84c --- /dev/null +++ b/test/files/pos/bug319.scala @@ -0,0 +1,21 @@ +object test { + + trait A { type T; } + + trait B { type T; } + + /** def functor(x: A): B { type T = x.T } */ + abstract class functor() { + val arg: A; + val res: B { type T = arg.T } = + new B { type T = arg.T; }; + } + + val a = new A { type T = String }; + /** val b: B { type T = String } = functor(a) */ + val b: B { type T = String } = { + val tmp = new functor() { val arg = a }; + tmp.res + } + +} |