Aladdin - Scala Bugtracking
[#882] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean Martin fixed 2007-01-10 21:46:26.0
subject view bounds don't work on trait type parameters
code
package test;
trait SortedSet[A <% Ordered[A]] {
  def first : A;
  def last : A;
  assert(first.compare(last) < 0);
}
what happened
compiler error: value compare is not a member of A
what expected It makes sense to me now that this code shouldn't compile (traits don't have constructor arguments). However, the compiler should provide an error about using view bounds in a trait definition.
[back to overview]
Changes of this bug report
Martin  edited on  2007-03-08 11:06:06.0