Skip to content

Commit 1259aaf

Browse files
committed
Fix wording of translation rule
1 parent e95bb6f commit 1259aaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/reference/extend/extension-methods.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ assert(circle.circumference == CircleOps.circumference(circle))
3535
### Translation of Calls to Extension Methods
3636

3737
The rules for resolving a selection `e.m` are augmented as follows: If `m` is not a
38-
member of the type `T` of `e`, and there is an implicit value `i` that defines `m`
39-
in either the current scope or in the implicit scope of `T`, then `e.m` is expanded
40-
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
38+
member of the type `T` of `e`, and there is an implicit value `i`
39+
in either the current scope or in the implicit scope of `T`, and `i` defines an extension
40+
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
4141
of expanding, an ambiguity error results.
4242

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

0 commit comments

Comments
 (0)