diff options
author | Paul Phillips <paulp@improving.org> | 2011-06-21 17:21:07 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-06-21 17:21:07 +0000 |
commit | a546fc8f4979a0705e62df71b905860e1ce0a89d (patch) | |
tree | 19bfa9e3351847270c3d9a419142c34261d01e27 /test | |
parent | 4b8810d3a35bca001ccde28c24ea3000c3b47a07 (diff) | |
download | scala-a546fc8f4979a0705e62df71b905860e1ce0a89d.tar.gz scala-a546fc8f4979a0705e62df71b905860e1ce0a89d.tar.bz2 scala-a546fc8f4979a0705e62df71b905860e1ce0a89d.zip |
Relaxes a typer check which fails valid code wi...
Relaxes a typer check which fails valid code with NoCommonType. If the
instantiated types or type bounds do not conform, it tries normalizing
the type before throwing the exception. Closes #4553. I wrote this patch
with adriaan already, but bonus review by moors.
Diffstat (limited to 'test')
-rwxr-xr-x | test/files/pos/bug4553.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/bug4553.scala b/test/files/pos/bug4553.scala new file mode 100755 index 0000000000..4eefe57b2b --- /dev/null +++ b/test/files/pos/bug4553.scala @@ -0,0 +1,11 @@ +trait VectorLike[+T, +V[A] <: Vector[A]] { + def +[S, VResult[S] >: V[S]](v: VResult[S]) +} + +trait Vector[+T] extends VectorLike[T, Vector] +trait ImmutableVector[T] extends Vector[T] with VectorLike[T, ImmutableVector] +trait MutableVector[T] extends Vector[T] with VectorLike[T, MutableVector] + +object Test { + def f = (null: MutableVector[Int]) + (null: ImmutableVector[Int]) +} |