You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the swap of the two parameters `x` and `xs` when translating
@@ -113,6 +113,7 @@ extension (ss: Seq[String]):
113
113
```
114
114
115
115
The same can be written with braces as follows (note that indented regions can still be used inside braces):
116
+
116
117
```scala
117
118
extension (ss: Seq[String]) {
118
119
@@ -239,11 +240,13 @@ The following two rewritings are tried in order:
239
240
from `T` to a type containing `m`. If there is more than one way of rewriting, an ambiguity error results.
240
241
241
242
An extension method can also be referenced using a simple identifier without a preceding expression. If an identifier `g` appears in the body of an extension method `f` and refers to an extension method `g` that is defined in the same collective extension
243
+
242
244
```scala
243
245
extension (x: T)
244
246
deff ... = ... g ...
245
247
defg ...
246
248
```
249
+
247
250
the identifier is rewritten to `x.g`. This is also the case if `f` and `g` are the same method. Example:
0 commit comments