Aladdin - Scala Bugtracking
[#488] project: nsc priority: medium category: bug
submitter assigned to status date submitted
Sean Martin fixed 2005-11-16 17:53:51.0
subject abstract override broken
code
class Members[Model] extends HashSet[Model] with ObservableSet[Model,Members];
what happened
Works under ScalaC, under NSC:
      [nsc] Compiling 2 source files to /home/mcdirmid/workspace/scala/build/nstools
      [nsc] /home/mcdirmid/workspace/scala/sources/scala/tools/nsc/model/Models.scala:41 error: error overriding\
 method += in trait ObservableSet of type (Models.this.Model)scala.Unit;
      [nsc]  method += needs `abstract override' modifiers
      [nsc]       override def +=(elem: Model): Unit = super.+=(elem);
      [nsc]                 ^
      [nsc] /home/mcdirmid/workspace/scala/sources/scala/tools/nsc/model/Models.scala:43 error: error overriding\
 method -= in trait ObservableSet of type (Models.this.Model)scala.Unit;
      [nsc]  method -= needs `abstract override' modifiers
      [nsc]       override def -=(elem: Model): Unit = super.+=(elem);
      [nsc]                 ^

what expected Either should compile or collection mixins should be rewritten. Most mixins in teh API use abstract override pattern.
[back to overview]
Changes of this bug report
Burak  edited on  2005-11-16 17:59:49.0
layout
Martin  edited on  2005-11-22 13:29:41.0
It was a bad interaction btw abstract override checking aand parameterized classes. The test case only checked the unparameterized case.