diff options
author | Martin Odersky <odersky@gmail.com> | 2006-08-22 16:20:09 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-08-22 16:20:09 +0000 |
commit | 9050da710809b5d9fafa577264b0e1aa61fc6ef7 (patch) | |
tree | 49f92667370f2dc78e03612ca1c925b583ff1144 /test/files/pos | |
parent | dd535c3645330025d366f82f1032184b51886274 (diff) | |
download | scala-9050da710809b5d9fafa577264b0e1aa61fc6ef7.tar.gz scala-9050da710809b5d9fafa577264b0e1aa61fc6ef7.tar.bz2 scala-9050da710809b5d9fafa577264b0e1aa61fc6ef7.zip |
Fixed bugs. Generalized implicit lookup.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/bug661.scala | 17 | ||||
-rwxr-xr-x | test/files/pos/bug690.scala | 14 | ||||
-rwxr-xr-x | test/files/pos/bug694.scala | 10 |
3 files changed, 41 insertions, 0 deletions
diff --git a/test/files/pos/bug661.scala b/test/files/pos/bug661.scala new file mode 100644 index 0000000000..3a447241fe --- /dev/null +++ b/test/files/pos/bug661.scala @@ -0,0 +1,17 @@ +package test; + +object test { + abstract class A { + abstract class C { + type M; + def foo(n : M) : Unit = {} + } + } + trait B extends A { + type N; + trait C extends super.C { + type M = N; + override def foo(n : M) : Unit = super.foo(n); + } + } +} diff --git a/test/files/pos/bug690.scala b/test/files/pos/bug690.scala new file mode 100755 index 0000000000..a93c54f007 --- /dev/null +++ b/test/files/pos/bug690.scala @@ -0,0 +1,14 @@ +package test; +trait test { + type T; + trait Manager { + type T <: test.this.T; + def foo(t : T) = {}; + } + object M0 extends Manager { + override type T = test.this.T; + override def foo(t : T) = super.foo(t); + } + def t : T; + M0.foo(t); +} diff --git a/test/files/pos/bug694.scala b/test/files/pos/bug694.scala new file mode 100755 index 0000000000..96eb55f5c0 --- /dev/null +++ b/test/files/pos/bug694.scala @@ -0,0 +1,10 @@ +object test3 { + trait Type[T]; + case object IntType extends Type[Int]; + case object StringType extends Type[String]; + + def f[T](t : Type[T]) : T = t match { + case IntType => 10; + case StringType => "hello"; + } +}
\ No newline at end of file |