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
Copy file name to clipboardexpand all lines: docs/_spec/07-implicits.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ The _parts_ of a type ´T´ are:
63
63
- if ´T´ is a type projection `´S´#´U´`, the parts of ´S´ as well as ´T´ itself;
64
64
- if ´T´ is a type alias, the parts of its expansion;
65
65
- if ´T´ is an abstract type, the parts of its upper bound;
66
-
- if ´T´ denotes an implicit conversion to a type with a method with argument types ´T_1, ..., T_n´ and result type ´U´, the union of the parts of ´T_1, ..., T_n´ and ´U´;
66
+
- if ´T´ is a structural type with a method with argument types ´T_1, ..., T_n´ and result type ´U´, the union of the parts of ´T_1, ..., T_n´ and ´U´;
67
67
- in all other cases, just ´T´ itself.
68
68
69
69
Note that packages are internally represented as classes with companion modules to hold the package members.
@@ -288,7 +288,7 @@ The search proceeds as in the case of implicit parameters, where the implicit sc
288
288
If such a view is found, the selection ´e.m´ is converted to `´v´(´e´).´m´`.
289
289
1. In a selection ´e.m(\mathit{args})´ with ´e´ of type ´T´, if the selector ´m´ denotes some member(s) of ´T´, but none of these members is applicable to the arguments ´\mathit{args}´.
290
290
In this case a view ´v´ is searched which is applicable to ´e´ and whose result contains a method ´m´ which is applicable to ´\mathit{args}´.
291
-
The search proceeds as in the case of implicit parameters, where the implicit scope is the one of ´T´. If such a view is found, the selection ´e.m´ is converted to `´v´(´e´).´m(\mathit{args})´`.
291
+
The search proceeds as in the case of implicit parameters, where the implicit scope is the one of `´T´ => ´\mathit{pt}´`, with ´\mathit{pt}´ being the structural type ´{ def m(\mathit{args}: T_1 , ... , T_n): U }´. If such a view is found, the selection ´e.m´ is converted to `´v´(´e´).´m(\mathit{args})´`.
292
292
293
293
The implicit view, if it is found, can accept its argument ´e´ as a call-by-value or as a call-by-name parameter.
294
294
However, call-by-value implicits take precedence over call-by-name implicits.
0 commit comments