Aladdin - Scala Bugtracking
[#152] project: compiler priority: low category: bug
submitter assigned to status date submitted
Philippe Martin won't fix 2003-09-29 14:08:11.0
subject unclear error message with type selection from class argument
code
abstract class Foo {
  type T;
}

class Bar(foo: Foo)  {
  def a: foo.T = a;
}
what happened
./tmp/test.scala:8: type foo.type escapes its defining scope as part of scala.Object { def a: foo.T }
class Bar(foo: Foo)  {
      ^
one error found
what expected Maybe a different error message. The message would also be much more clear if it was located on the definition of the infringing method instead on the definition of the whole class. That's especially true if the class contains many method definitions.
[back to overview]
Changes of this bug report
Martin  edited on  2003-10-09 12:35:59.0
It's really hard to fix this, and I do not think the error is that common.