File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ Status: Draft
66
77## CHANGELOG
88
9+ 2024.12.17
10+ - Change the function literal return type inference rules to ignore
11+ ` return; ` statements in generators (it doesn't actually cause null to be
12+ returned).
13+
9142022.05.12
1015 - Define the notions of "constraint solution for a set of type variables" and
1116 "Grounded constraint solution for a set of type variables". These
@@ -324,7 +329,8 @@ schema.
324329 ` e ` , using the local type inference algorithm described below with typing
325330 context ` K ` , and update ` T ` to be ` UP(flatten(S), T) ` if the enclosing
326331 function is ` async ` , or ` UP(S, T) ` otherwise.
327- - For each ` return; ` statement in the block, update ` T ` to be ` UP(Null, T) ` .
332+ - If the enclosing function is not marked ` sync* ` or ` async* ` : For each
333+ ` return; ` statement in the block, update ` T ` to be ` UP(Null, T) ` .
328334 - For each ` yield e; ` statement in the block, let ` S ` be the inferred type of
329335 ` e ` , using the local type inference algorithm described below with typing
330336 context ` K ` , and update ` T ` to be ` UP(S, T) ` .
You can’t perform that action at this time.
0 commit comments