You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: accepted/future-releases/nnbd/feature-specification.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Status: Draft
11
11
static rules for return statements, and dynamic semantics of return in
12
12
asynchronous non-generators.
13
13
- Add rule that the use of expressions of type `void*` is restricted in
14
-
the same way as expressions of type `void`.
14
+
the same way as the use of expressions of type `void`.
15
15
16
16
2020.04.30
17
17
- Specify static analysis of `e1 == e2`.
@@ -292,7 +292,8 @@ The function **futureValueType** is defined as follows:
292
292
293
293
_Note that it is a compile-time error unless the return type of an asynchronous
294
294
non-generator function is a supertype of `Future<Never>`, which means that
295
-
the last case will only be applied when `S` is a non-`void` top type._
295
+
the last case will only be applied when `S` is `Object` or a non-`void` top
296
+
type._
296
297
297
298
### Return statements
298
299
@@ -310,7 +311,8 @@ and $S$ is \VOID{} or \code{\VOID*}.
310
311
```
311
312
312
313
_Comparing to Dart before null-safety, this means that it is no longer allowed
313
-
to "return void to null" in a regular function._
314
+
to return a void expression in a regular function if the return type is
315
+
`Null`._
314
316
315
317
At [this location](https://github.com/dart-lang/language/blob/65b8267be0ebb9b3f0849e2061e6132021a4827d/specification/dartLangSpec.tex#L15525)
316
318
about an asynchronous non-generator function with future value type `$T_v$`,
@@ -345,7 +347,7 @@ value type is `Future<U>` for some `U` which is not a top type._
0 commit comments