Aladdin - Scala Bugtracking
[#1124] project: scala-doc priority: low category: bug
submitter assigned to status date submitted
Nikolay Sean open 2007-05-21 13:24:35.0
subject [contrib #514] Exception when documenting classes using early initialisation
code
Running scaladoc on the following code... :

class A {}

/** Documentation...
 */
class B extends {

  val v = "foo"

} with A


... gives the following error:

Exception in thread "main" java.lang.Error: no-symbol does not have owner
        at scala.tools.nsc.symtab.Symbols$NoSymbol$.owner(Symbols.scala:1340)
        at scala.tools.nsc.typechecker.Namers$Namer.applicableTypeParams(Namers.scala:231)
        at scala.tools.nsc.typechecker.Namers$Namer.deSkolemize(Namers.scala:233)
        at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:740)
        at scala.tools.nsc.typechecker.Namers$Namer$$anon$0.complete(Namers.scala:356)
        at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:417)
        at scala.tools.nsc.symtab.Symbols$Symbol.initialize(Symbols.scala:525)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2404)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2648)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2681)
        at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1396)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$58.apply(Typers.scala:1426)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$58.apply(Typers.scala:1426)
        at scala.List$.loop$0(List.scala:243)
        at scala.List$.mapConserve(List.scala:260)
        at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1426)
        at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1254)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2443)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2648)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2681)
        at scala.tools.nsc.typechecker.Typers$Typer.typePrimaryConstrBody(Typers.scala:772)
        at scala.tools.nsc.typechecker.Typers$Typer.parentTypes(Typers.scala:829)
        at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:946)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2413)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2648)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2434)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2648)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2681)
        at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1396)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$58.apply(Typers.scala:1426)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$58.apply(Typers.scala:1426)
        at scala.List$.loop$0(List.scala:243)
        at scala.List$.mapConserve(List.scala:260)
        at scala.List$.loop$0(List.scala:247)
        at scala.List$.mapConserve(List.scala:260)
        at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1426)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2409)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2648)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2681)
        at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$1.apply(Analyzer.scala:38)
        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:241)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:230)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$2.apply(Global.scala:230)
        at scala.Iterator$class.foreach(Iterator.scala:369)
        at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:245)
        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:230)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:498)
        at scala.tools.nsc.Global$Run.compile(Global.scala:572)
        at scala.tools.nsc.Main$.process(Main.scala:57)
        at scala.tools.nsc.Main$.main(Main.scala:77)
        at scala.tools.nsc.Main.main(Main.scala)
what happened
scaladoc crashed with java.lang.Error exception
what expected Succesful scaladoc generation
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-05-21 13:27:11.0
I don't know what's specific about scaladoc - scalac works fine - but I assigned it Martin because there's nothing scaladoc-ish in the stack trace
Sean  edited on  2007-05-21 14:08:44.0
Crashes the presentation compiler but does not crash the build compiler. That would explain why ScalaDoc is affected, as it runs in the onlyPresentation mode. Could this occur because not all the phases are being run?
Sean  edited on  2007-05-21 14:18:42.0
Just updated to the new trunk and it doesn't seem to crash anymore. Already fixed.
Sean  edited on  2007-05-27 09:48:48.0
Users are complaining that they bug is not fixed. Strange, I'll look into it.
Martin  edited on  2007-05-28 15:39:09.0
I compiled in the presentation compiler but did not see a crash. Reassigned to Sean. -- Martin