Aladdin - Scala Bugtracking
[#577] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-04-26 18:57:36.0
subject private var problem
code
trait PriorityTree {
  type Node <: BasicTreeNode;
  
  val top = initTree;
  top.next = (initTree);
  top.next.prev = (top);
  
  def initTree : Node;
  
  

  
  trait BasicTreeNode {
    private[PriorityTree] var next  : Node = _;
    private[PriorityTree] var prev  : Node = _;
    private[PriorityTree] var chld : Node = _;
    //var next  : Node = _;
    //var prev  : Node = _;
    //var chld : Node = _;
  }
}
what happened
Note: the crash doesn't happen if the private modifier is removed, exception during compilation (using build I j\
ust pulled):

scala.tools.nsc.symtab.Types$TypeError: method next_= cannot be accessed in test.PriorityTree#BasicTreeNode
	at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.reportTypeError(Typers.scala:140)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1633)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1651)
	at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$23.apply(Erasure.scala:618)
	at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$23.apply(Erasure.scala:613)
	at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:38)
	at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:613)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1041)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:22)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:213)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:202)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:202)
	at scala.Iterator$class.foreach(Iterator.scala:285)
	at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:216)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:202)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:432)
	at scala.tools.nsc.Global$Run.compile(Global.scala:490)
	at ch.epfl.lamp.sdt.build.ScalaCompilerManager$ScalaCompiler.compile(ScalaCompilerManager.java:186)
	at ch.epfl.lamp.sdt.build.ScalaProjectBuilder.build(ScalaProjectBuilder.java:76)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:253)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:282)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:204)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
what expected simplified bug report, doesn't seem to be related to mixins
[back to overview]
Changes of this bug report
Sean  edited on  2006-04-26 18:58:59.0
Martin  edited on  2006-04-28 19:23:59.0