diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart index beae35565c2..22ee9226151 100644 --- a/pkg/kernel/lib/ast.dart +++ b/pkg/kernel/lib/ast.dart @@ -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 diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h index 5296e689b4e..cc562eb991e 100644 --- a/runtime/vm/kernel_binary.h +++ b/runtime/vm/kernel_binary.h @@ -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, };