tags:

views:

96

answers:

1

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
+1  A: 
missingfaktor
i'm sorry man, this doesn't fix the issue
paintcan
@paintcan, just tested. It works here. What version of Scala are you using?
missingfaktor
version is in post, but since you say this worked for you we're going to try to reproduce the issue in a project with all extraneous crap removed
paintcan
seems like there was an aliasing issue due to an import of java.lang.Double. whoops
paintcan
You don't really need `override` when the method being overridden is abstract.
Daniel