summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-03 20:16:21 +0000
committerPaul Phillips <paulp@improving.org>2011-01-03 20:16:21 +0000
commitcb10f8a9ff1e2eff1fdca76ffac64962a1bb5ac6 (patch)
tree7dab999829005043bf508f49a8db9460e8d32a3a /src/compiler/scala/tools/nsc/typechecker/Contexts.scala
parent4e0d481418774c6013d03bfb16a553e47a075779 (diff)
downloadscala-cb10f8a9ff1e2eff1fdca76ffac64962a1bb5ac6.tar.gz
scala-cb10f8a9ff1e2eff1fdca76ffac64962a1bb5ac6.tar.bz2
scala-cb10f8a9ff1e2eff1fdca76ffac64962a1bb5ac6.zip
Since r22374 isCompatible and isCompatibleArg h...
Since r22374 isCompatible and isCompatibleArg have been bit-for-bit identical methods. Deleted isCompatibleArg. Also gave some structure to the act of disabling implicit search. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index eb96a6fba6..7f0be68fca 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -138,6 +138,13 @@ trait Contexts { self: Analyzer =>
tparams
}
+ def withImplicitsDisabled[T](op: => T): T = {
+ val saved = implicitsEnabled
+ implicitsEnabled = false
+ try op
+ finally implicitsEnabled = saved
+ }
+
/**
* @param unit ...
* @param tree ...