Skip to content

Commit

Permalink
Improve documentation of implicit conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
rjolly committed Apr 5, 2024
1 parent b8fb81b commit aae29f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ Views are applied in three situations:
`v` which is applicable to `e` and whose result contains a method
`m` which is applicable to `args` is searched. 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 application
`e.m(args)` is converted to `v(e).m(args)`.
the one of `T => pt`, with `pt` being the structural type
`{ def m(args: T_1 , \ldots , T_n): U }`. If such a view is found,
the application `e.m(args)` is converted to `v(e).m(args)`.

# Differences with Scala 2 implicit conversions

Expand Down
2 changes: 1 addition & 1 deletion docs/_spec/07-implicits.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The _parts_ of a type ´T´ are:
- if ´T´ is a type projection `´S´#´U´`, the parts of ´S´ as well as ´T´ itself;
- if ´T´ is a type alias, the parts of its expansion;
- if ´T´ is an abstract type, the parts of its upper bound;
- 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´;
- 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´;
- in all other cases, just ´T´ itself.

Note that packages are internally represented as classes with companion modules to hold the package members.
Expand Down

0 comments on commit aae29f1

Please # to comment.