From 5c9400467b802dfb7102f2de507bb3c0c4193c22 Mon Sep 17 00:00:00 2001 From: Gilles Dubochet Date: Mon, 19 Jul 2010 11:57:51 +0000 Subject: [scaladoc] Fixes an issue whereas inherited mem... [scaladoc] Fixes an issue whereas inherited members in objects would not see their types instantiated properly. No review. --- src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala index 285a0a2329..2e4e4f83bc 100644 --- a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala @@ -449,7 +449,11 @@ class ModelFactory(val global: Global, val settings: doc.Settings) { thisFactory def makeType(aType: Type, inTpl: => TemplateImpl, dclSym: Symbol): TypeEntity = { def ownerTpl(sym: Symbol): Symbol = if (sym.isClass || sym.isModule || sym == NoSymbol) sym else ownerTpl(sym.owner) - val tpe = if (thisFactory.settings.useStupidTypes.value) aType else aType.asSeenFrom(inTpl.sym.thisType, ownerTpl(dclSym)) + val tpe = + if (thisFactory.settings.useStupidTypes.value) aType else { + val fixedSym = if (inTpl.sym.isModule) inTpl.sym.moduleClass else inTpl.sym + aType.asSeenFrom(fixedSym.thisType, ownerTpl(dclSym)) + } makeType(tpe, inTpl) } -- cgit v1.2.3