From 3cd5dd628af41ac561174cea5ea37670f182f914 Mon Sep 17 00:00:00 2001 From: Erik Ernst Date: Tue, 21 Jul 2020 09:19:49 +0200 Subject: [PATCH] Change `?` to `_`, cf. PR 1102 --- resources/type-system/inference.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/resources/type-system/inference.md b/resources/type-system/inference.md index be3a948ec4..934adc60f0 100644 --- a/resources/type-system/inference.md +++ b/resources/type-system/inference.md @@ -284,14 +284,9 @@ The function **futureValueTypeSchema** is defined as follows: - **futureValueTypeSchema**(`FutureOr`) = `S`, for all `S`. - **futureValueTypeSchema**(`void`) = `void`. - **futureValueTypeSchema**(`dynamic`) = `dynamic`. -- **futureValueTypeSchema**(`?`) = `?`. +- **futureValueTypeSchema**(`_`) = `_`. - Otherwise, for all `S`, **futureValueTypeSchema**(`S`) = `Object?`. -_In this definition, when `?` occurs as a type on its own, it is the type -schema that imposes no constraints, cf. section 'Type Schemas'. Note that it -has nothing to do with nullability, and in particular it does not stand for -`T?` for any `T`._ - _Note that it is a compile-time error unless the return type of an asynchronous non-generator function is a supertype of `Future`, which means that the last case will only be applied when `S` is `Object` or a top type._