Skip to content

Commit

Permalink
Infer transactional for anonymous functions
Browse files Browse the repository at this point in the history
Part of #267.
  • Loading branch information
jclark committed Dec 17, 2020
1 parent bf2c6a7 commit 0eb9979
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -5524,9 +5524,11 @@ <h3>Anonymous function expression</h3>
</pre>
<p>
An infer-anonymous-function-expr can only be used in a context where a function
type is expected. Both the types of the parameters and whether the function is
isolated are inferred from the expected
function type. The scope of the parameters is <code>expr-function-body</code>.
type is expected. Both the types of the parameters and whether the function type
is <code>isolated</code> are inferred from the expected function type. The
function type will be inferred to be <code>transactional</code> if the
expr-function-body calls any functions with a transactional type.
The scope of the parameters is <code>expr-function-body</code>.
The static type of the infer-anonymous-function-expr will be a function type
whose return type is the static type of the <code>expression</code> in
<code>expr-function-body</code>. If the contextually expected type for the
Expand Down

0 comments on commit 0eb9979

Please sign in to comment.