Skip to content

Commit 8f901a7

Browse files
committed
By mistake, last round of review adjustments in #941 was not pushed; here it is
1 parent de117af commit 8f901a7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

accepted/future-releases/nnbd/feature-specification.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Status: Draft
1111
static rules for return statements, and dynamic semantics of return in
1212
asynchronous non-generators.
1313
- 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`.
1515

1616
2020.04.30
1717
- Specify static analysis of `e1 == e2`.
@@ -292,7 +292,8 @@ The function **futureValueType** is defined as follows:
292292

293293
_Note that it is a compile-time error unless the return type of an asynchronous
294294
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._
296297

297298
### Return statements
298299

@@ -310,7 +311,8 @@ and $S$ is \VOID{} or \code{\VOID*}.
310311
```
311312

312313
_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`._
314316

315317
At [this location](https://github.com/dart-lang/language/blob/65b8267be0ebb9b3f0849e2061e6132021a4827d/specification/dartLangSpec.tex#L15525)
316318
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._
345347
The dynamic semantics specified at
346348
[this location](https://github.com/dart-lang/language/blob/65b8267be0ebb9b3f0849e2061e6132021a4827d/specification/dartLangSpec.tex#L15597)
347349
is changed as follows, where `$f$` is the enclosing function with declared
348-
return type `$T$`, and `$e$` is the returned expression with static type `$S$`:
350+
return type `$T$`, and `$e$` is the returned expression:
349351

350352
```
351353
When $f$ is a synchronous non-generator, evaluation proceeds as follows:

0 commit comments

Comments
 (0)