diff options
author | Paul Phillips <paulp@improving.org> | 2011-07-16 05:44:13 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-07-16 05:44:13 +0000 |
commit | 12162603c4a16a65a174eee211f3d577efce3286 (patch) | |
tree | 88e8a56e7325befe02a9c7222d3ab63d5d8bcae0 /test/files | |
parent | 207b5ef725cea2f1e7fe6c54a4f3c451f8c708f6 (diff) | |
download | scala-12162603c4a16a65a174eee211f3d577efce3286.tar.gz scala-12162603c4a16a65a174eee211f3d577efce3286.tar.bz2 scala-12162603c4a16a65a174eee211f3d577efce3286.zip |
Fixed a big bug in type constructor unification...
Fixed a big bug in type constructor unification caused by considering
only the parents rather than all the base types. This fix is a testament
to the power of haranguing people in bars when you are deeply offended
by a bug, like someone was by this one:
def f[CC[X] <: Traversable[X]](x: CC[Int]) = ()
f(1 to 5) // did not compile! Fear not, it does now
Review by moors.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/hkrange.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/pos/hkrange.scala b/test/files/pos/hkrange.scala new file mode 100644 index 0000000000..a6803230ed --- /dev/null +++ b/test/files/pos/hkrange.scala @@ -0,0 +1,5 @@ +class A { + def f[CC[X] <: Traversable[X]](x: CC[Int]) = () + + f(1 to 5) +} |