summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2010-03-10 17:50:15 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2010-03-10 17:50:15 +0000
commit23d5dfc76b33fcd75d18d27c221c0ede9574e13d (patch)
tree3063f9a96f018c27ba0f75a6846d23deef0ccd8d /src
parent6ee849b6eea1dbc3db46d8a87e82154dc7d1ebf7 (diff)
downloadscala-23d5dfc76b33fcd75d18d27c221c0ede9574e13d.tar.gz
scala-23d5dfc76b33fcd75d18d27c221c0ede9574e13d.tar.bz2
scala-23d5dfc76b33fcd75d18d27c221c0ede9574e13d.zip
slight (syntactic) cleanup of patch for see #31...
slight (syntactic) cleanup of patch for see #3152 -- sorry, only realised when looking over my patch again
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 5e9827b9ed..1e9f086355 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -649,13 +649,14 @@ trait Infer {
if (targ.typeSymbol == NothingClass &&
(isWildcard(restpe) || notCovariantIn(tparam, restpe))) {
leftUndet += tparam
- // tparam.tpeHK -- AM: don't know why we returned a type arg that should surely be discarded afterwards since the type param was considered undetermined...
- } else if (targ.typeSymbol == RepeatedParamClass) {
- okParams += tparam; okArgs += targ.baseType(SeqClass)
- } else if (targ.typeSymbol == JavaRepeatedParamClass) {
- okParams += tparam; okArgs += targ.baseType(ArrayClass)
+ // don't add anything to okArgs, it'll be filtered out later anyway
+ // used `tparam.tpeHK` as dummy before
} else {
- okParams += tparam; okArgs += targ.widen
+ okParams += tparam
+ okArgs +=
+ if (targ.typeSymbol == RepeatedParamClass) targ.baseType(SeqClass)
+ else if (targ.typeSymbol == JavaRepeatedParamClass) targ.baseType(ArrayClass)
+ else targ.widen
}
}