The solution I found is:
/**
* Doc here.
*/
object SigmaDDFactoryImpl {
lazy val ipfFactory = new SigmaDDIPFFactoryImpl {
val inductiveIPFFactory = new SigmaDDInductiveIPFFactoryImpl // I removed the braces here
}
class SigmaDD
}
/**
* Doc here.
*/
abstract class SigmaDDIPFFactoryImpl {
type InductiveIPFType = inductiveIPFFactory.InductiveTypeImpl
val inductiveIPFFactory:SigmaDDInductiveIPFFactoryImpl
}
class SigmaDDInductiveIPFFactoryImpl {
class InductiveTypeImpl
object MyObj extends InductiveTypeImpl
}
/**
* Doc here.
*/
class OtherClass {
type InductiveIPF = SigmaDDFactoryImpl.ipfFactory.InductiveIPFType
def method(inductiveElt:InductiveIPF) = inductiveElt match {
case a:SigmaDDFactoryImpl.ipfFactory.inductiveIPFFactory.InductiveTypeImpl => None
case SigmaDDFactoryImpl.ipfFactory.inductiveIPFFactory.MyObj => None
}
}
However, I still wonder why scaladoc
needs to compile the code.