@@ -7,12 +7,12 @@ Initial implementation in (#1775)[https://github.com/lampepfl/dotty/pull/1775].
7
7
8
8
## Syntax
9
9
10
- Type ::= [ ` implicit'] FunArgTypes ` =>' Type
11
- | HkTypeParamClause `=>' Type
12
- | InfixType
13
- Expr ::= [ ` implicit'] FunParams ` =>' Expr
14
- BlockResult ::= [ ` implicit'] FunParams ` =>' Block
15
- | Expr1
10
+ Type ::= [`implicit'] FunArgTypes `=>' Type
11
+ | HkTypeParamClause `=>' Type
12
+ | InfixType
13
+ Expr ::= [`implicit'] FunParams `=>' Expr
14
+ BlockResult ::= [`implicit'] FunParams `=>' Block
15
+ | Expr1
16
16
17
17
Implicit function types associate to the right, e.g.
18
18
` implicit S ⇒ implicit T ⇒ U ` is the same as ` implicit S ⇒ (implicit T ⇒ U) ` .
@@ -41,7 +41,7 @@ the type `Ti` of any of the parameters `xi` can be omitted, in which case `Ti
41
41
= Si` is assumed. If the expected type of the anonymous implicit function is
42
42
some other type, all implicit parameter types must be explicitly given, and
43
43
the expected type of ` e ` is undefined. The type of the anonymous implicit
44
- function is ` scala.ImplicitFunctionN[S1, ...,Sn, T] ` , where ` T ` is the packed
44
+ function is ` scala.ImplicitFunctionN[S1, ...,Sn, T] ` , where ` T ` is the widened
45
45
type of ` e ` . ` T ` must be equivalent to a type which does not refer to any of
46
46
the implicit parameters ` xi ` .
47
47
@@ -63,7 +63,7 @@ that case, a fresh name for the parameter is chosen arbitrarily.
63
63
Note: The closing paragraph of the [ Anonymous Functions section] (https://www
64
64
.scala-lang.org/files/archive/spec/2.12/06-expressions.html#anonymous-
65
65
functions) of the Scala 2.12 is subsumed by implicit function types and should
66
- be remove .
66
+ be removed .
67
67
68
68
Anonymous implicit functions ` implicit (x1: T1, ..., xn: Tn) => e ` are
69
69
automatically inserted around any expression ` e ` whose expected type is
0 commit comments