implementing java interface with scala class - type issue
Posted
by paintcan
on Stack Overflow
See other posts from Stack Overflow
or by paintcan
Published on 2010-06-08T16:15:18Z
Indexed on
2010/06/08
16:22 UTC
Read the original article
Hit count: 252
scala
Why on earth won't this compile? Scala 2.8.0RC3:
Java
public interface X {
void logClick(long ts, int cId, String s, double c);
}
Scala
class Y extends X {
def logClick(ts: Long, cId: Int,sid: java.lang.String,c: Double) : Unit = {
...
}
}
Error
class Y needs to be abstract, since method logClick in trait X of type
(ts: Long,cId: Int,s: java.lang.String,c: Double)Unit is not defined
© Stack Overflow or respective owner