summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2011-06-29 10:27:41 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2011-06-29 10:27:41 +0000
commit84442a01cec37e3f96e330b7e0167a9ef387e8c8 (patch)
tree5a27740a1e6e4101b6b8861064a62ec17c20d077 /test
parent7a1dc55abe5c50dae3c7a0990f852c40408454e7 (diff)
downloadscala-84442a01cec37e3f96e330b7e0167a9ef387e8c8.tar.gz
scala-84442a01cec37e3f96e330b7e0167a9ef387e8c8.tar.bz2
scala-84442a01cec37e3f96e330b7e0167a9ef387e8c8.zip
slight improvement to lubList so that the simpl...
slight improvement to lubList so that the simple case of lubbing type constructors works. review by extempore the strategy is to detect when the ts in lub(ts) are actually type constructors and remember their type parameters the BTS of a type constructor is a list of proper types (the type constructors have been applied to their dummy arguments, which are simply type refs to the original type parameters) in lubList, we undo this damage by stripping these dummy arguments (they refer to type parameters that are meant to be bound) a better fix would be to actually bind those type parameters that appear free in error, but that would require major changes to the BTS infrastructure example that only kindasorta works now... given: trait Container[+T] trait Template[+CC[X] <: Container[X]] class C1[T] extends Template[Container] with Container[T] C1's BTS contains Template[Container] with Container[T], but that should really be [T] => Template[Container] with Container[T] instead of wrapping it in a polytype, the current approach uses elimHOTparams to patch up this type so that it looks more like a type ctor: Template[Container] with Container, but this is ill-kinded as Template[Container] is a proper type, whereas Container is not the performance impact should be minimal, but caveat reviewer
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/hklub0.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/pos/hklub0.scala b/test/files/pos/hklub0.scala
new file mode 100644
index 0000000000..8f68aab4ea
--- /dev/null
+++ b/test/files/pos/hklub0.scala
@@ -0,0 +1,5 @@
+object Test {
+ val a : scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq] = null
+ val b : scala.collection.generic.GenericCompanion[scala.collection.mutable.Seq] = null
+ List(a, b) // immutable.this.List.apply[scala.collection.generic.GenericCompanion[Seq]](Test.this.a, Test.this.b)
+} \ No newline at end of file