Skip to content

Commit

Permalink
Fix wording of translation rule
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Sep 17, 2018
1 parent e95bb6f commit 1259aaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/reference/extend/extension-methods.md
Expand Up @@ -35,9 +35,9 @@ assert(circle.circumference == CircleOps.circumference(circle))
### Translation of Calls to Extension Methods

The rules for resolving a selection `e.m` are augmented as follows: If `m` is not a
member of the type `T` of `e`, and there is an implicit value `i` that defines `m`
in either the current scope or in the implicit scope of `T`, then `e.m` is expanded
to `i.m(e)`. This expansion is attempted at the time where the compiler also tries an implicit conversion from `T` to a type containing `m`. If there is more than one way
member of the type `T` of `e`, and there is an implicit value `i`
in either the current scope or in the implicit scope of `T`, and `i` defines an extension
method named `m`, then `e.m` is expanded to `i.m(e)`. This expansion is attempted at the time where the compiler also tries an implicit conversion from `T` to a type containing `m`. If there is more than one way
of expanding, an ambiguity error results.

So `circle.circumference` translates to `CircleOps.circumference(circle)`, provided
Expand Down

0 comments on commit 1259aaf

Please sign in to comment.