Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Linter: Override is broken #134

@nicoonoclaste

Description

@nicoonoclaste

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 => -\/(()) }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions