[cfe] Change integer values that encode nullability attributes

This CL also completes the renaming of "neither" into "undetermined" by
renaming kNeither value in the nullability enum in
runtime/vm/kernel_binary.h into kUndetermined.

Change-Id: Ia266bf1b35577212b696fb4a093340ee8e986256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121989
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
This commit is contained in:
Dmitry Stefantsov
2019-10-18 08:46:16 +00:00
committed by commit-bot@chromium.org
parent 9a829cc0b3
commit b212403cf8
2 changed files with 15 additions and 15 deletions
+12 -12
View File
@@ -5339,18 +5339,6 @@ class _PublicName extends Name {
/// Represents nullability of a type.
enum Nullability {
/// Nullable types are marked with the '?' modifier.
///
/// Null, dynamic, and void are nullable by default.
nullable,
/// Non-nullable types are types that aren't marked with the '?' modifier.
///
/// Note that Null, dynamic, and void that are nullable by default. Note also
/// that some types denoted by a type parameter without the '?' modifier can
/// be something else rather than non-nullable.
nonNullable,
/// Non-legacy types not known to be nullable or non-nullable statically.
///
/// An example of such type is type T in the example below. Note that both
@@ -5365,6 +5353,18 @@ enum Nullability {
/// }
undetermined,
/// Nullable types are marked with the '?' modifier.
///
/// Null, dynamic, and void are nullable by default.
nullable,
/// Non-nullable types are types that aren't marked with the '?' modifier.
///
/// Note that Null, dynamic, and void that are nullable by default. Note also
/// that some types denoted by a type parameter without the '?' modifier can
/// be something else rather than non-nullable.
nonNullable,
/// Types in opt-out libraries are 'legacy' types.
///
/// They are both subtypes and supertypes of the nullable and non-nullable
+3 -3
View File
@@ -164,9 +164,9 @@ enum ConstantTag {
// Keep in sync with package:kernel/lib/ast.dart
enum Nullability {
kNullable = 0,
kNonNullable = 1,
kNeither = 2,
kUndetermined = 0,
kNullable = 1,
kNonNullable = 2,
kLegacy = 3,
};