|
[#1143] |
project: compiler |
priority: high |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Sean |
Martin |
fixed |
2007-05-28 17:01:39.0 |
subject |
return of the mixin sandwich crash |
code |
// 3 files
// test/Presentations.scala
package test;
import scala.collection.jcl._
trait Presentations {
type File <: FileImpl
trait FileImpl {
private[Presentations] val set = new LinkedHashSet[String]
def f = {
Console println set.getClass
}
}
}
// test/AutoEdits.scala
package test;
import scala.collection.jcl._
trait AutoEdits extends Presentations {
type File <: FileImpl
trait FileImpl extends super.FileImpl {
private[AutoEdits] val set = new LinkedHashSet[String] // Node]
override def f = {
super.f
Console println set.getClass
}
}
}
// test/Test.scala
package test;
object Test extends AutoEdits {
class File extends super[AutoEdits].FileImpl {}
def main(args : Array[String]) : Unit = {
val file = new File
file.f
}
}
|
what happened |
sean-mcdirmid:~/workspace/test13/src mcdirmid$ ../../scala/build/quick/bin/scalac -resident -d ../bin
nsc> test/Presentations.scala test/AutoEdits.scala test/Test.scala
nsc>
sean-mcdirmid:~/workspace/test13/src mcdirmid$ ../../scala/build/quick/bin/scala -classpath ../bin test.Test
class scala.collection.jcl.LinkedHashSet
class scala.collection.jcl.LinkedHashSet
sean-mcdirmid:~/workspace/test13/src mcdirmid$ ../../scala/build/quick/bin/scalac -resident -d ../bin
nsc> test/Presentations.scala test/Test.scala
nsc>
sean-mcdirmid:~/workspace/test13/src mcdirmid$ ../../scala/build/quick/bin/scala -classpath ../bin test.Test
class scala.collection.jcl.LinkedHashSet
class scala.collection.jcl.LinkedHashSet
sean-mcdirmid:~/workspace/test13/src mcdirmid$ ../../scala/build/quick/bin/scalac -resident -d ../bin
nsc> test/Presentations.scala test/AutoEdits.scala test/Test.scala
nsc> test/Presentations.scala test/Test.scala
nsc>
sean-mcdirmid:~/workspace/test13/src mcdirmid$ ../../scala/build/quick/bin/scala -classpath ../bin test.Test
java.lang.AbstractMethodError: test.Test$File.test$AutoEdits$$set_$eq(Lscala/collection/jcl/LinkedHashSet;)V
at test.AutoEdits$FileImpl$class.$init$(AutoEdits.scala:6)
at test.Test$File.(Test.scala:4)
at test.Test$.main(Test.scala:6)
at test.Test.main(Test.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:75)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:106)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
|
what expected |
I'm sure this is a repeat of the mixin sandwhich problems we had last year. I'm surprised this wasn't caught in the test suite, I'll look into getting this test in there.
|
[back to overview] |