Aladdin - Scala Bugtracking
[#744] project: compiler priority: high category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-09-20 11:57:49.0
subject Trait initialization messed up
code
package test;

trait Linked {
  type File <: FileImpl;
  trait FileImpl {
    Console.println("Hello from linked");
  }
}
object test {
  class Test extends Linked { 
    trait FileImpl extends super.FileImpl; 
    class File extends FileImpl;
  }
  def main(args : Array[String]) : Unit = {
    Console.println("BEGIN");
    val test = new Test;
    val file = new test.File;
    Console.println("END");
  }
}
what happened
Build, hit run:

BEGIN
END
A trait super call is not being missed somewhere.
what expected
BEGIN
Hello from linked
END
[back to overview]
Changes of this bug report
Martin  edited on  2006-09-20 14:07:40.0