Aladdin - Scala Bugtracking
[#211] project: compiler priority: high category: bug
submitter assigned to status date submitted
Martin Michel fixed 2003-10-27 13:01:28.0
subject compound self types crash AddInterfaces
code
trait A;
trait B;
class Foo: (A with B) extends A with B;
object Test with Executable {
  new Foo();
  System.out.println("bug211 completed");
}

what happened
Exception in thread "main" scalac.ApplicationError: unexpected type for parent: CompoundType([TypeRef(ThisType(<\
none>),A,[]),TypeRef(ThisType(),B,[])],{},.)
	at scalac.util.Debug.abort(Debug.java:58)
	at scalac.transformer.AddInterfacesPhase.getClassSymbol(AddInterfacesPhase.java:293)
	at scalac.transformer.AddInterfaces.transform(AddInterfaces.java:254)
	at scalac.transformer.AddInterfaces.transform(AddInterfaces.java:66)
	at scalac.ast.Transformer.transform(Transformer.java:143)
	at scalac.transformer.AddInterfaces.transform(AddInterfaces.java:275)
	at scalac.ast.Transformer.transform(Transformer.java:271)
	at scalac.ast.Transformer.transform(Transformer.java:85)
	at scalac.transformer.AddInterfaces.transform(AddInterfaces.java:112)
	at scalac.transformer.AddInterfaces.transform(AddInterfaces.java:66)
	at scalac.ast.Transformer.apply(Transformer.java:67)
	at scalac.transformer.AddInterfacesPhase.apply(AddInterfacesPhase.java:31)
	at scalac.Global.compile(Global.java:290)
	at scalac.Global.compile(Global.java:263)
	at scalac.Main.main(Main.java:32)
what expected Successful compilation. This bug is blocking a solution to bug210 (expression problem). I have added a hack in AddInterfaces.java to fix this (from line 244), but the fix is commented out right now, because I am not sure it is correct.
[back to overview]
Changes of this bug report
Michel  edited on  2003-10-27 16:14:39.0