tox4j / deprecated-tox4j

Deprecated, see http://github.com/TokTok/jvm-toxcore-c
http://github.com/TokTok/jvm-toxcore-c
Other
42 stars 17 forks source link

Linter: Override is broken #134

Open nbraud opened 9 years ago

nbraud commented 9 years ago

The im.tox.tox4j.lint.Override linter reports spurious errors.

For instance, Implementations of abstract methods must have the 'override' modifier: $init$ is reported on this code:

import scala.collection.GenTraversable
import scalaz._

trait OverrideTest[K, T <: Iterable[K]] extends GenTraversable[T] {
  def method(id: K): \/[Unit, Boolean]
  def method(obj: T): \/[Unit, Boolean] = delete(obj.head)
}

There is also a spurious isDefinedAt reported against an anonymous function:

import scala.util.Try
import scalaz._

final object OverrideTest {
  private def static[A](x: Try[\/[Unit, A]]): Try[\/[Unit, A]] = {
    x.recover { case exn: Exception => -\/(()) }
  }
}