Skip to content

Commit

Permalink
Rename Unapply trait parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jul 6, 2023
1 parent 1229003 commit 6067202
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/conversions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,5 @@ trait Irrefutable[-ValueType, +ResultType]:
def unapply(value: ValueType): ResultType

object As:
def unapply[T](v: Any)(using ext: Unapply[v.type, T]): Option[T] = ext.unapply(v)
def unapply[MatchType](scrutinee: Any)(using Unapply[scrutinee.type, MatchType]): Option[MatchType] =
summon[Unapply[scrutinee.type, MatchType]].unapply(scrutinee)

0 comments on commit 6067202

Please sign in to comment.