diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-06-29 10:27:41 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-06-29 10:27:41 +0000 |
commit | 84442a01cec37e3f96e330b7e0167a9ef387e8c8 (patch) | |
tree | 5a27740a1e6e4101b6b8861064a62ec17c20d077 /META-INF/MANIFEST.MF | |
parent | 7a1dc55abe5c50dae3c7a0990f852c40408454e7 (diff) | |
download | scala-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 'META-INF/MANIFEST.MF')
0 files changed, 0 insertions, 0 deletions