Aladdin - Scala Bugtracking
[#182] project: compiler priority: low category: bug
submitter assigned to status date submitted
Philippe Martin fixed 2003-10-07 09:21:11.0
subject overrinding classes generate contradicting error messages
code
class Foo { class I; }
class Bar extends Foo { class I; }
what happened
tmp/test.scala:4: error overriding class Foo.I in class Foo;
 class Bar.I in class Bar needs `override' modifier
class Bar extends Foo { class I; }
                              ^
one error found

After adding the missing override modifier, we get the following error message:

tmp/test.scala:2: `override' modifier not allowed for classes
class Bar extends Foo { override class I; }
                                       ^
one error found
what expected

In both case, the error message should say that classes may not be overridden.

[back to overview]
Changes of this bug report
Martin  edited on  2003-10-08 20:38:58.0