diff --git a/docs/docs/reference/contextual/extension-methods.md b/docs/docs/reference/contextual/extension-methods.md index a89658d14608..93b688912a1b 100644 --- a/docs/docs/reference/contextual/extension-methods.md +++ b/docs/docs/reference/contextual/extension-methods.md @@ -78,7 +78,7 @@ Type parameters on extensions can also be combined with type parameters on the m themselves: ```scala extension [T](xs: List[T]) - def sumBy[B](f: A => B)(using Numeric[B]): B = ... + def sumBy[U](f: T => U)(using Numeric[U]): U = ... ``` Type arguments matching method type parameters are passed as usual: