summaryrefslogtreecommitdiff
path: root/src/scaladoc
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-04-24 12:43:19 -0700
committerPaul Phillips <paulp@improving.org>2013-04-24 12:43:19 -0700
commit10845adebe741fc2bb5bce70df0a8da7788aa722 (patch)
treed01116546fd4a028da84b19d71b34ef964543bc2 /src/scaladoc
parent44625e35a57b32c0417d29bbb075db64651516e5 (diff)
parentb36717cb8328b384b0fa32389f780ecddad50494 (diff)
downloadscala-10845adebe741fc2bb5bce70df0a8da7788aa722.tar.gz
scala-10845adebe741fc2bb5bce70df0a8da7788aa722.tar.bz2
scala-10845adebe741fc2bb5bce70df0a8da7788aa722.zip
Merge pull request #2393 from retronym/ticket/7345-2
SI-7345 Refactoring Contexts
Diffstat (limited to 'src/scaladoc')
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala
index 1f87f935f2..6cefe34887 100644
--- a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala
+++ b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala
@@ -226,12 +226,9 @@ trait ModelFactoryImplicitSupport {
// look for type variables in the type. If there are none, we can decide if the implicit is there or not
if (implType.isTrivial) {
try {
- context.flushBuffer() /* any errors here should not prevent future findings */
- // TODO: Not sure this is the right thing to do -- seems similar to what scalac should be doing
- val context2 = context.make(context.unit, context.tree, sym.owner, context.scope, context.imports)
- val search = inferImplicit(EmptyTree, tpe, false, false, context2, false)
- context.flushBuffer() /* any errors here should not prevent future findings */
-
+ // TODO: Not sure if `owner = sym.owner` is the right thing to do -- seems similar to what scalac should be doing
+ val silentContext = context.make(owner = sym.owner).makeSilent(reportAmbiguousErrors = false)
+ val search = inferImplicit(EmptyTree, tpe, false, false, silentContext, false)
available = Some(search.tree != EmptyTree)
} catch {
case _: TypeError =>