summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2009-11-09 21:33:34 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2009-11-09 21:33:34 +0000
commit26a13165f4a00ce8c0336058fbde937ddb59e718 (patch)
tree03c4bc5e47e38a31be355672611879467daf9571
parent29d431ce89db67e079943eeaff322c60410cd713 (diff)
downloadscala-26a13165f4a00ce8c0336058fbde937ddb59e718.tar.gz
scala-26a13165f4a00ce8c0336058fbde937ddb59e718.tar.bz2
scala-26a13165f4a00ce8c0336058fbde937ddb59e718.zip
attempt to fix build -- can't build on my old m...
attempt to fix build -- can't build on my old macbook, so flying blind :-/
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index 18831600b7..fddb02cd71 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -434,7 +434,7 @@ self: Analyzer =>
// filter out failures from type inference, don't want to remove them from undetParams!
val uninstantiated = new ListBuffer[Symbol]
- val detargs = adjustTypeArgs(undetParams, targs, pt, uninstantiated)
+ val detargs = adjustTypeArgs(undetParams, targs, WildcardType, uninstantiated) // TODO: WildcardType should be pt, need to fix adjustTypeArgs first
val (okParams, okArgs) = (undetParams zip detargs) filter {case (p, a) => !uninstantiated.contains(p)} unzip
// TODO: optimise above line(s?) once `zipped filter` works (oh, the irony! this line is needed to get Zipped to type check...)
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 8b600bfd90..2313f166f7 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -588,14 +588,14 @@ trait Infer {
* Map T* entries to Seq[T].
*/
def adjustTypeArgs(tparams: List[Symbol], targs: List[Type], restpe: Type, uninstantiated: ListBuffer[Symbol]): List[Type] = {
- @inline def covariantOrNotContained(variance: Int) =
- ((variance & COVARIANT) == 0) || // tparam occurred covariantly
- (variance == VARIANCES) // tparam did not occur
+ @inline def covariant/*OrNotContained*/(variance: Int) =
+ ((variance & COVARIANT) == 0)/* || // tparam occurred covariantly
+ (variance == VARIANCES) // tparam did not occur */ // TODO: fix
List.map2(tparams, targs) {(tparam, targ) =>
if (targ.typeSymbol == NothingClass &&
( restpe == WildcardType
- || covariantOrNotContained(varianceInType(restpe)(tparam)))) {
+ || covariant/*OrNotContained*/(varianceInType(restpe)(tparam)))) {
uninstantiated += tparam
tparam.tpeHK //@M tparam.tpe was wrong: we only want the type constructor,
// not the type constructor applied to dummy arguments