Skip to content

extension method type parameter bounded by class param #7022

@scabug

Description

@scabug

Works as a regular class, not as a value class.

  import scala.util.control.Exception._

  implicit class RichCatch[T](val c: Catch[T]) extends AnyVal {
    def validation[U >: T](u: => U): Either[Throwable, U] = c.either(u) 
  }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions