Aladdin - Scala Bugtracking
[#357] project: compiler priority: low category: bug
submitter assigned to status date submitted
Philippe Matthias open 2004-08-12 12:54:41.0
subject scalap bug: inferred compound type crash scalap
code
package test;

class Bar;
class Foo;
class Foo1 extends Foo with Bar;
class Foo2 extends Foo with Bar;

trait Use {
  def infer(b: Boolean) = if (b) new Foo1 else new Foo2;
}
what happened
The command scalap test.Use produces the following error:
Exception in thread "main" java.lang.Error: symbol does not have members
	at scala.Predef$.error(Predef.scala:65)
	at scala.tools.scalap.Symbol$class.members(Entity.scala:124)
	at scala.tools.scalap.ScalaWriter$class.printType0(ScalaWriter.scala:172)
	at scala.tools.scalap.ScalaWriter$class.printType(ScalaWriter.scala:138)
	at scala.tools.scalap.ScalaWriter$class.printType0(ScalaWriter.scala:183)
	at scala.tools.scalap.ScalaWriter$class.printType(ScalaWriter.scala:138)
	at scala.tools.scalap.ScalaWriter$class.printSymbol(ScalaWriter.scala:56)
	at scala.tools.scalap.ScalaWriter$$anon$1.apply(ScalaWriter.scala:99)
	at scala.tools.scalap.ScalaWriter$$anon$1.apply(ScalaWriter.scala:89)
	at scala.Iterator$class.foreach(Iterator.scala:252)
	at scala.tools.scalap.ScalaWriter$class.printScope(ScalaWriter.scala:88)
	at scala.tools.scalap.ScalaWriter$class.printType0(ScalaWriter.scala:172)
	at scala.tools.scalap.ScalaWriter$class.printType(ScalaWriter.scala:138)
	at scala.tools.scalap.ScalaWriter$class.printSymbol(ScalaWriter.scala:42)
	at scala.tools.scalap.Main$$anon$3.apply(Main.scala:73)
	at scala.tools.scalap.Main$$anon$3.apply(Main.scala:73)
	at scala.Iterator$class.foreach(Iterator.scala:252)
	at scala.tools.scalap.Main$.process(Main.scala:72)
	at scala.tools.scalap.Main$$anon$4.apply(Main.scala:146)
	at scala.tools.scalap.Main$$anon$4.apply(Main.scala:146)
	at scala.List$class.foreach(List.scala:472)
	at scala.tools.scalap.Main$.main(Main.scala:146)
	at scala.tools.scalap.Main.main(Main.scala:114)
what expected No crash
[back to overview]
Changes of this bug report