From 1259aaf4801e5ceec5ac9f6c6a1ff833af22bcf5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 17 Sep 2018 15:47:36 +0200 Subject: [PATCH] Fix wording of translation rule --- docs/docs/reference/extend/extension-methods.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/reference/extend/extension-methods.md b/docs/docs/reference/extend/extension-methods.md index dbc9eab98029..c8f009851038 100644 --- a/docs/docs/reference/extend/extension-methods.md +++ b/docs/docs/reference/extend/extension-methods.md @@ -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