diff --git a/docs/docs/reference/contextual/extension-methods.md b/docs/docs/reference/contextual/extension-methods.md index 105d7b906c63..094e6b1c7465 100644 --- a/docs/docs/reference/contextual/extension-methods.md +++ b/docs/docs/reference/contextual/extension-methods.md @@ -24,7 +24,7 @@ circle.circumference An extension method translates to a specially labelled method that takes the leading parameter section as its first argument list. The label, expressed as `` here, is compiler-internal. So, the definition of `circumference` above translates to the following method, and can also be invoked as such: -```scala +``` def circumference(c: Circle): Double = c.radius * math.Pi * 2 assert(circle.circumference == circumference(circle)) @@ -49,7 +49,7 @@ x min 3 The three definitions above translate to -```scala +``` def < (x: String)(y: String): Boolean = ... def +: (xs: Seq[Elem])(x: Elem): Seq[Elem] = ... infix def min(x: Number)(y: Number): Number = ...