File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ Status: Draft
6
6
7
7
## CHANGELOG
8
8
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
+
9
14
2022.05.12
10
15
- Define the notions of "constraint solution for a set of type variables" and
11
16
"Grounded constraint solution for a set of type variables". These
@@ -324,7 +329,8 @@ schema.
324
329
` e ` , using the local type inference algorithm described below with typing
325
330
context ` K ` , and update ` T ` to be ` UP(flatten(S), T) ` if the enclosing
326
331
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) ` .
328
334
- For each ` yield e; ` statement in the block, let ` S ` be the inferred type of
329
335
` e ` , using the local type inference algorithm described below with typing
330
336
context ` K ` , and update ` T ` to be ` UP(S, T) ` .
You can’t perform that action at this time.
0 commit comments