Aladdin - Scala Bugtracking
[#1023] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean Iulian fixed 2007-03-26 12:29:43.0
subject Badness with trait nested in trait named Class
code
package test;
trait Mix {
  abstract class Entity(string: String);
  trait ClassOrObject extends Entity;
  trait TopLevel extends ClassOrObject;
  trait Class extends ClassOrObject;
  class TopLevelClass(string : String) extends Entity(string) with TopLevel with Class;
}
object Main extends Mix {
  def main(args : Array[String]) : Unit = new TopLevelClass("hello");
}
what happened
On run:
Exception in thread "main" java.lang.NoClassDefFoundError: test/Mix$class (wrong name: test/Mix$Class)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at test.Main$.(Main.scala:10)
	at test.Main$.(Main.scala)
	at test.Main.main(Main.scala)
Somebody is probably being case insensitive somewhere. Is either a problem with our compiler or the VM.
what expected
[back to overview]
Changes of this bug report
Iulian  edited on  2007-05-01 09:58:31.0
It seems to have been fixed by some other bugfix.