summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-04-12 23:47:59 -0700
committerMartin Odersky <odersky@gmail.com>2012-04-12 23:47:59 -0700
commit1c89ab72339fee8767869585f28811d5e2e437b1 (patch)
treec794d4b1d52af53beca4829c6ee159bd53d37af6 /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
parenta7a1e3a1959f26c9b44b40b328ef217b4ebdbaba (diff)
downloadscala-1c89ab72339fee8767869585f28811d5e2e437b1.tar.gz
scala-1c89ab72339fee8767869585f28811d5e2e437b1.tar.bz2
scala-1c89ab72339fee8767869585f28811d5e2e437b1.zip
Enabling postfix ops feature warning, and working on libs to avoid them.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
index edc69be827..96cd7dde59 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -483,7 +483,7 @@ trait ContextErrors {
val keep = missing take 3 map (_.name)
".\nUnspecified value parameter%s %s".format(
if (missing.tail.isEmpty) "" else "s",
- if (missing drop 3 nonEmpty) (keep :+ "...").mkString(", ")
+ if ((missing drop 3).nonEmpty) (keep :+ "...").mkString(", ")
else keep.mkString("", ", ", ".")
)
}
@@ -644,7 +644,7 @@ trait ContextErrors {
private def applyErrorMsg(tree: Tree, msg: String, argtpes: List[Type], pt: Type) = {
def asParams(xs: List[Any]) = xs.mkString("(", ", ", ")")
- def resType = if (pt isWildcard) "" else " with expected result type " + pt
+ def resType = if (pt.isWildcard) "" else " with expected result type " + pt
def allTypes = (alternatives(tree) flatMap (_.paramTypes)) ++ argtpes :+ pt
def locals = alternatives(tree) flatMap (_.typeParams)