Scala Programming Language
  1. Scala Programming Language
  2. SI-7022

extension method type parameter bounded by class param

    Details

      Description

      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) 
        }
      

        Issue Links

          Activity

          Hide
          Paul Phillips added a comment -

          This is SI-6482, fixed by ff9f60f420c0 in master. I believe it's an easy backport.

          Show
          Paul Phillips added a comment - This is SI-6482 , fixed by ff9f60f420c0 in master. I believe it's an easy backport.
          Hide
          Paul Phillips added a comment -

          I just clicked assign-to-me but I won't get to it immediately or anything so take it back if you want it.

          Show
          Paul Phillips added a comment - I just clicked assign-to-me but I won't get to it immediately or anything so take it back if you want it.
          Show
          Jason Zaugg added a comment - https://github.com/scala/scala/pull/1976

            People

            • Assignee:
              Jason Zaugg
              Reporter:
              Jason Zaugg
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development