| [#332] | project: compiler | priority: high | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Burak | Martin | fixed | 2004-05-14 12:00:42.0 | |
| subject | [contrib #32] Compilation error with Java Swing code | |||
| code |
Test.scala:
class Test extends javax.swing.JComponent {
} |
|||
| what happened | |
|||
| what expected | Successful compilation. I saw another bug report super interfaces that was deemed a feature, but I am not sure this is related. Defining a remove method does not solve the problem. | |||
| [back to overview] | ||||
| Burak edited on 2004-05-14 12:01:40.0 |
Burak: Java overriding + overloading is the problem.
|
| Burak edited on 2004-05-14 14:17:01.0 |
Here's another (scala) instance of the problem:
trait A {
def foo(i:int) : unit ;
}
class B {
def foo(i:int) = {}
}
// overloaded def shadows super's methods
class C extends B with A {
def foo(s:String) = {}
}
what happens:
testS.scala:11: class C needs to be abstract, since method foo in trait A is not defined
class C extends B with A {
^
one error found
|
| Martin edited on 2004-07-01 14:11:31.0 |