summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2010-09-24 12:30:39 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2010-09-24 12:30:39 +0000
commit7fa6c08f531a65d4b238deee8907644b8a37a499 (patch)
treeb87b1c641acc3a931fde5d4df18f2030b96e00a3 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentba5d0ec898c7c7fffc56e00bb955b53ec4c8e3da (diff)
downloadscala-7fa6c08f531a65d4b238deee8907644b8a37a499.tar.gz
scala-7fa6c08f531a65d4b238deee8907644b8a37a499.tar.bz2
scala-7fa6c08f531a65d4b238deee8907644b8a37a499.zip
closes #3808.
moved typing indentation to where it belongs, now inliner shuold be able to do its job in implicits as well no review
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 082d9afcfd..742f792e84 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -842,7 +842,8 @@ trait Typers { self: Analyzer =>
// as we would get ambiguity errors otherwise. Example
// Looking for a manifest of Nil: This mas many potential types,
// so we need to instantiate to minimal type List[Nothing].
- false) // false: retract Nothing's that indicate failure, ambiguities in manifests are dealt with in manifestOfType
+ keepNothings = false, // retract Nothing's that indicate failure, ambiguities in manifests are dealt with in manifestOfType
+ checkCompat = isWeaklyCompatible) // #3808
}
val typer1 = constrTyperIf(treeInfo.isSelfOrSuperConstrCall(tree))
@@ -1037,7 +1038,7 @@ trait Typers { self: Analyzer =>
* @return ...
*/
def instantiate(tree: Tree, mode: Int, pt: Type): Tree = {
- inferExprInstance(tree, context.extractUndetparams(), pt, true)
+ inferExprInstance(tree, context.extractUndetparams(), pt)
adapt(tree, mode, pt)
}
@@ -2488,7 +2489,7 @@ trait Typers { self: Analyzer =>
} else if (needsInstantiation(tparams, formals, args)) {
//println("needs inst "+fun+" "+tparams+"/"+(tparams map (_.info)))
- inferExprInstance(fun, tparams, WildcardType, true)
+ inferExprInstance(fun, tparams)
doTypedApply(tree, fun, args, mode, pt)
} else {
assert((mode & PATTERNmode) == 0) // this case cannot arise for patterns
@@ -3031,10 +3032,9 @@ trait Typers { self: Analyzer =>
errorTree(tree, treeSymTypeMsg(fun)+" does not take type parameters.")
}
- private[this] var typingIndent: String = ""
- @inline final def deindentTyping() = if (printTypings) typingIndent = typingIndent.substring(0, typingIndent.length() - 2)
- @inline final def indentTyping() = if (printTypings) typingIndent += " "
- @inline final def printTyping(s: => String) = if (printTypings) println(typingIndent+s)
+ @inline final def deindentTyping() = if (printTypings) context.typingIndent = context.typingIndent.substring(0, context.typingIndent.length() - 2)
+ @inline final def indentTyping() = if (printTypings) context.typingIndent += " "
+ @inline final def printTyping(s: => String) = if (printTypings) println(context.typingIndent+s)
/**
* @param tree ...