Aladdin - Scala Bugtracking
[#746] project: compiler priority: high category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-09-20 21:13:47.0
subject Necessary outer accessor not generated
code
package test;

trait DefaultScanner {
  abstract class SingletonFactory {
    def init = {} 
  }
  trait BraceFactory { 
    object openF extends SingletonFactory;
    openF.init;
  }
}
trait ScalaScanner extends DefaultScanner {
  abstract class CurlyFactory extends BraceFactory; 
}
trait ScalaAutoEdit extends ScalaScanner {
  trait BraceFactory extends super.BraceFactory {
    Console.println("hello scala auto edit");
  }
  trait CurlyFactory extends super.CurlyFactory with BraceFactory;
}
object test extends ScalaAutoEdit {
  object curlyFactory extends CurlyFactory;
  def main(args : Array[String]) : Unit = {
    val test = new ScalaTest;
    Console.println(curlyFactory);
  }
}
what happened
On execution:
Exception in thread "main" java.lang.NoSuchMethodError: test.ScalaAutoEdit$BraceFactory$class.test$DefaultS\
canner$BraceFactory$$$outer(Ltest/ScalaAutoEdit$BraceFactory;)Ltest/DefaultScanner;
	at test.test$curlyFactory$.test$DefaultScanner$BraceFactory$$$outer(test.scala:22)
	at test.DefaultScanner$BraceFactory$openF$.(test.scala:8)
	at test.ScalaScanner$CurlyFactory.openF(test.scala:13)
	at test.DefaultScanner$BraceFactory$class.$init$(test.scala:9)
	at test.ScalaScanner$CurlyFactory.(test.scala:13)
	at test.test$curlyFactory$.(test.scala:22)
	at test.test$curlyFactory$.(test.scala)
	at test.test$.main(test.scala:25)
	at test.test.main(test.scala)
what expected
[back to overview]
Changes of this bug report
Sean  edited on  2006-09-20 21:14:07.0
Note, this is why Scala-doc is probably broken right now.
Martin  edited on  2006-09-21 12:30:20.0