[#413] | project: specification | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Iulian | Martin | _ | 2005-04-04 17:05:26.0 | |
subject | mixin example doesn't compile | |||
code |
class A { def f: Int = 1 ; def g: Int = 2 ; def h: Int = 3 } abstract class B { def f: Int = 4 ; def g: Int } abstract class C extends A with B { def h: Int } |
|||
what happened | outer.scala:14: error overriding method f in class A; method f in class B needs `override' modifier abstract class C extends A with B { def h: Int } ^ outer.scala:14: error overriding method h in class A; method h in class C needs `override' modifier abstract class C extends A with B { def h: Int } ^ |
|||
what expected | Silent compilation This example appears at page 42 (Example 5.1.2). The first "override" cannot be solved: adding an override modifier will trigger another error (" method f:scala.Int in class B overrides nothing"). | |||
[back to overview] |