Version 2.10.0-113.0.dev

Merge commit '8008c8d54ef917588a2a3732da8660bb5b3bcda4' into 'dev'
diff --git a/.gitignore b/.gitignore
index 2bc7008..0ad331e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,6 +61,7 @@
 .gdb_history
 
 # Clangd files
+.cache/clangd
 .clangd
 
 # Built by chromebot and downloaded from Google Storage
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 7560e5b..a956473 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -5332,6 +5332,9 @@
       enumFields = expressionType.classNode.fields
           .where((Field field) => field.isConst && field.type == expressionType)
           .toSet();
+      if (expressionType.isPotentiallyNullable) {
+        enumFields.add(null);
+      }
     }
 
     inferrer.flowAnalysis.switchStatement_expressionEnd(node);
@@ -5350,8 +5353,12 @@
         Expression caseExpression = caseExpressionResult.expression;
         switchCase.expressions[index] = caseExpression..parent = switchCase;
         DartType caseExpressionType = caseExpressionResult.inferredType;
-        if (enumFields != null && caseExpression is StaticGet) {
-          enumFields.remove(caseExpression.target);
+        if (enumFields != null) {
+          if (caseExpression is StaticGet) {
+            enumFields.remove(caseExpression.target);
+          } else if (caseExpression is NullLiteral) {
+            enumFields.remove(null);
+          }
         }
 
         if (!inferrer.isTopLevel) {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.1.expect
index b4fad46..772111a 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.1.expect
@@ -9,7 +9,7 @@
   abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
     final field wid::_Location? _location /*isNullableByDefault, from null */;
     const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
-      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
       ;
   }
 }
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.2.expect
index b6f2a14..fa8d466 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.2.expect
@@ -9,7 +9,7 @@
   abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
     final field wid::_Location? _location /*isNullableByDefault, from null */;
     const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
-      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
       ;
   }
 }
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.3.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.3.expect
index b4fad46..772111a 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_const.yaml.world.3.expect
@@ -9,7 +9,7 @@
   abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
     final field wid::_Location? _location /*isNullableByDefault, from null */;
     const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
-      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
       ;
   }
 }
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.1.expect
index cf1b295..451ec20 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.1.expect
@@ -9,7 +9,7 @@
   abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
     final field wid::_Location? _location /*isNullableByDefault, from null */;
     const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
-      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
       ;
   }
 }
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.2.expect
index c2ce924..b996249 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transform_nnbd.yaml.world.2.expect
@@ -9,7 +9,7 @@
   abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
     final field wid::_Location? _location /*isNullableByDefault, from null */;
     const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
-      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
       ;
   }
 }
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml
new file mode 100644
index 0000000..0813f0a
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml
@@ -0,0 +1,82 @@
+# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+type: newworld
+target: DDC
+trackWidgetCreation: true
+worlds:
+  - entry: main.dart
+    experiments: non-nullable
+    sources:
+      main.dart: |
+        // @dart=2.8
+        import 'foo.dart';
+      foo.dart: |
+        // @dart=2.8
+        import 'package:flutter/src/widgets/framework.dart';
+        import 'package:flutter/src/widgets/widget_inspector.dart';
+
+        class Foo extends StatelessWidget {
+          const Foo([Object key]) : super(key: key);
+        }
+      flutter/lib/src/widgets/framework.dart: |
+        abstract class Bar {
+          const Bar();
+        }
+        abstract class Widget extends Bar {
+          final Object? key;
+
+          const Widget({this.key});
+        }
+        abstract class StatelessWidget extends Widget {
+          const StatelessWidget({Object? key}) : super(key: key);
+        }
+      flutter/lib/src/widgets/widget_inspector.dart: |
+        abstract class _HasCreationLocation {
+          _Location get _location;
+        }
+        /// A tuple with file, line, and column number, for displaying human-readable
+        /// file locations.
+        class _Location {
+          const _Location({
+            required this.file,
+            required this.line,
+            required this.column,
+            required this.name,
+            required this.parameterLocations,
+          });
+          /// File path of the location.
+          final String file;
+          /// 1-based line number.
+          final int line;
+          /// 1-based column number.
+          final int column;
+          /// Optional name of the parameter or function at this location.
+          final String name;
+          /// Optional locations of the parameters of the member at this location.
+          final List<_Location> parameterLocations;
+        }
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "flutter",
+              "rootUri": "../flutter",
+              "packageUri": "lib/"
+            }
+          ]
+        }
+    expectedLibraryCount: 4
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        // @dart=2.8
+        import 'foo.dart';
+        Foo foo = const Foo();
+    expectedLibraryCount: 4
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml.world.1.expect
new file mode 100644
index 0000000..c8ff76f
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml.world.1.expect
@@ -0,0 +1,65 @@
+main = <No Member>;
+library from "package:flutter/src/widgets/framework.dart" as fra {
+
+  abstract class Bar extends dart.core::Object /*hasConstConstructor*/  {
+    const constructor •() → fra::Bar
+      : super dart.core::Object::•()
+      ;
+  }
+  abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
+    final field dart.core::Object? key;
+    final field wid::_Location? _location /*isNullableByDefault, from null */;
+    const constructor •({dart.core::Object? key = #C1, wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
+      : fra::Widget::key = key, super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
+      ;
+  }
+  abstract class StatelessWidget extends fra::Widget /*hasConstConstructor*/  {
+    const constructor •({dart.core::Object? key = #C1, wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::StatelessWidget
+      : super fra::Widget::•(key: key, $creationLocationd_0dea112b090073317d4: $creationLocationd_0dea112b090073317d4)
+      ;
+  }
+}
+library from "package:flutter/src/widgets/widget_inspector.dart" as wid {
+
+  abstract class _HasCreationLocation extends dart.core::Object {
+    synthetic constructor •() → wid::_HasCreationLocation
+      : super dart.core::Object::•()
+      ;
+    abstract get _location() → wid::_Location;
+  }
+  class _Location extends dart.core::Object /*hasConstConstructor*/  {
+    final field dart.core::String file;
+    final field dart.core::int line;
+    final field dart.core::int column;
+    final field dart.core::String name;
+    final field dart.core::List<wid::_Location> parameterLocations;
+    const constructor •({required dart.core::String file = #C1, required dart.core::int line = #C1, required dart.core::int column = #C1, required dart.core::String name = #C1, required dart.core::List<wid::_Location> parameterLocations = #C1}) → wid::_Location
+      : wid::_Location::file = file, wid::_Location::line = line, wid::_Location::column = column, wid::_Location::name = name, wid::_Location::parameterLocations = parameterLocations, super dart.core::Object::•()
+      ;
+  }
+}
+library from "org-dartlang-test:///foo.dart" as foo {
+
+  import "package:flutter/src/widgets/framework.dart";
+  import "package:flutter/src/widgets/widget_inspector.dart";
+
+  class Foo extends fra::StatelessWidget /*hasConstConstructor*/  {
+    const constructor •([dart.core::Object* key = #C1]) → foo::Foo*
+      : super fra::StatelessWidget::•(key: key)
+      ;
+    abstract member-signature get key() → dart.core::Object*; -> fra::Widget::key
+    abstract member-signature operator ==(dynamic other) → dart.core::bool*; -> dart.core::Object::==
+    abstract member-signature get hashCode() → dart.core::int*; -> dart.core::Object::hashCode
+    abstract member-signature method toString() → dart.core::String*; -> dart.core::Object::toString
+    abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic; -> dart.core::Object::noSuchMethod
+    abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///foo.dart";
+
+}
+constants  {
+  #C1 = null
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml.world.2.expect
new file mode 100644
index 0000000..a05b0cf
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_43371.yaml.world.2.expect
@@ -0,0 +1,67 @@
+main = <No Member>;
+library from "package:flutter/src/widgets/framework.dart" as fra {
+
+  abstract class Bar extends dart.core::Object /*hasConstConstructor*/  {
+    const constructor •() → fra::Bar
+      : super dart.core::Object::•()
+      ;
+  }
+  abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
+    final field dart.core::Object? key;
+    final field wid::_Location? _location /*isNullableByDefault, from null */;
+    const constructor •({dart.core::Object? key = #C1, wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
+      : fra::Widget::key = key, super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
+      ;
+  }
+  abstract class StatelessWidget extends fra::Widget /*hasConstConstructor*/  {
+    const constructor •({dart.core::Object? key = #C1, wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::StatelessWidget
+      : super fra::Widget::•(key: key, $creationLocationd_0dea112b090073317d4: $creationLocationd_0dea112b090073317d4)
+      ;
+  }
+}
+library from "package:flutter/src/widgets/widget_inspector.dart" as wid {
+
+  abstract class _HasCreationLocation extends dart.core::Object {
+    synthetic constructor •() → wid::_HasCreationLocation
+      : super dart.core::Object::•()
+      ;
+    abstract get _location() → wid::_Location;
+  }
+  class _Location extends dart.core::Object /*hasConstConstructor*/  {
+    final field dart.core::String file;
+    final field dart.core::int line;
+    final field dart.core::int column;
+    final field dart.core::String name;
+    final field dart.core::List<wid::_Location> parameterLocations;
+    const constructor •({required dart.core::String file = #C1, required dart.core::int line = #C1, required dart.core::int column = #C1, required dart.core::String name = #C1, required dart.core::List<wid::_Location> parameterLocations = #C1}) → wid::_Location
+      : wid::_Location::file = file, wid::_Location::line = line, wid::_Location::column = column, wid::_Location::name = name, wid::_Location::parameterLocations = parameterLocations, super dart.core::Object::•()
+      ;
+  }
+}
+library from "org-dartlang-test:///foo.dart" as foo {
+
+  import "package:flutter/src/widgets/framework.dart";
+  import "package:flutter/src/widgets/widget_inspector.dart";
+
+  class Foo extends fra::StatelessWidget /*hasConstConstructor*/  {
+    const constructor •([dart.core::Object* key = #C1]) → foo::Foo*
+      : super fra::StatelessWidget::•(key: key)
+      ;
+    abstract member-signature get key() → dart.core::Object*; -> fra::Widget::key
+    abstract member-signature operator ==(dynamic other) → dart.core::bool*; -> dart.core::Object::==
+    abstract member-signature get hashCode() → dart.core::int*; -> dart.core::Object::hashCode
+    abstract member-signature method toString() → dart.core::String*; -> dart.core::Object::toString
+    abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic; -> dart.core::Object::noSuchMethod
+    abstract member-signature get runtimeType() → dart.core::Type*; -> dart.core::Object::runtimeType
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///foo.dart";
+
+  static field foo::Foo* foo = #C2;
+}
+constants  {
+  #C1 = null
+  #C2 = foo::Foo {key:#C1, _location:#C1}
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.1.expect
index ad57ba5..99f8ec3 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.1.expect
@@ -9,7 +9,7 @@
   abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
     final field wid::_Location? _location /*isNullableByDefault, from null */;
     const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
-      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
       ;
   }
 }
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.2.expect
index 1990ba5..26c487d 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_widget_transformer_non_const.yaml.world.2.expect
@@ -9,7 +9,7 @@
   abstract class Widget extends fra::Bar implements wid::_HasCreationLocation /*hasConstConstructor*/  {
     final field wid::_Location? _location /*isNullableByDefault, from null */;
     const constructor •({wid::_Location? $creationLocationd_0dea112b090073317d4}) → fra::Widget
-      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4!
+      : super fra::Bar::•(), fra::Widget::_location = $creationLocationd_0dea112b090073317d4
       ;
   }
 }
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart
new file mode 100644
index 0000000..0275ec6
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart
@@ -0,0 +1,68 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+enum Enum { e1, e2 }
+
+int method1(Enum? e) {
+  switch (e) {
+    case Enum.e1:
+    case Enum.e2:
+      return 0;
+  }
+}
+
+int method2(Enum? e) {
+  switch (e) {
+    case Enum.e1:
+    case Enum.e2:
+      return 0;
+    case null:
+      return 1;
+  }
+}
+
+int method3(Enum? e) {
+  switch (e) {
+    case Enum.e1:
+    case Enum.e2:
+      return 0;
+    default:
+      return 1;
+  }
+}
+
+int method4(Enum? e) {
+  switch (e) {
+    case Enum.e1:
+    case Enum.e2:
+      return 0;
+    case null:
+    default:
+      return 1;
+  }
+}
+
+test() {
+  method1(Enum.e1);
+}
+
+main() {
+  expect(0, method2(Enum.e1));
+  expect(0, method2(Enum.e2));
+  expect(1, method2(null));
+
+  expect(0, method3(Enum.e1));
+  expect(0, method3(Enum.e2));
+  expect(1, method3(null));
+
+  expect(0, method4(Enum.e1));
+  expect(0, method4(Enum.e2));
+  expect(1, method4(null));
+}
+
+expect(expected, actual) {
+  if (expected != actual) {
+    throw 'Expected $expected, actual $actual.';
+  }
+}
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.outline.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.outline.expect
new file mode 100644
index 0000000..5316f5a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.outline.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Enum extends core::Object /*isEnum*/  {
+  final field core::int index;
+  final field core::String _name;
+  static const field core::List<self::Enum> values = const <self::Enum>[self::Enum::e1, self::Enum::e2];
+  static const field self::Enum e1 = const self::Enum::•(0, "Enum.e1");
+  static const field self::Enum e2 = const self::Enum::•(1, "Enum.e2");
+  const constructor •(core::int index, core::String _name) → self::Enum
+    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+    ;
+  method toString() → core::String
+    return this.{=self::Enum::_name};
+}
+static method method1(self::Enum? e) → core::int
+  ;
+static method method2(self::Enum? e) → core::int
+  ;
+static method method3(self::Enum? e) → core::int
+  ;
+static method method4(self::Enum? e) → core::int
+  ;
+static method test() → dynamic
+  ;
+static method main() → dynamic
+  ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect
new file mode 100644
index 0000000..5051631
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect
@@ -0,0 +1,112 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/switch_nullable_enum.dart:7:5: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// int method1(Enum? e) {
+//     ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Enum extends core::Object /*isEnum*/  {
+  final field core::int index;
+  final field core::String _name;
+  static const field core::List<self::Enum> values = #C7;
+  static const field self::Enum e1 = #C3;
+  static const field self::Enum e2 = #C6;
+  const constructor •(core::int index, core::String _name) → self::Enum
+    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+    ;
+  method toString() → core::String
+    return this.{=self::Enum::_name};
+}
+static method method1(self::Enum? e) → core::int {
+  switch(e) {
+    #L1:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+  }
+  return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/switch_nullable_enum.dart:7:5: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+int method1(Enum? e) {
+    ^" in null;
+}
+static method method2(self::Enum? e) → core::int {
+  switch(e) {
+    #L2:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L3:
+    case #C8:
+      {
+        return 1;
+      }
+  }
+}
+static method method3(self::Enum? e) → core::int {
+  switch(e) {
+    #L4:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L5:
+    default:
+      {
+        return 1;
+      }
+  }
+}
+static method method4(self::Enum? e) → core::int {
+  switch(e) {
+    #L6:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L7:
+    case #C8:
+    default:
+      {
+        return 1;
+      }
+  }
+}
+static method test() → dynamic {
+  self::method1(#C3);
+}
+static method main() → dynamic {
+  self::expect(0, self::method2(#C3));
+  self::expect(0, self::method2(#C6));
+  self::expect(1, self::method2(null));
+  self::expect(0, self::method3(#C3));
+  self::expect(0, self::method3(#C6));
+  self::expect(1, self::method3(null));
+  self::expect(0, self::method4(#C3));
+  self::expect(0, self::method4(#C6));
+  self::expect(1, self::method4(null));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual)) {
+    throw "Expected ${expected}, actual ${actual}.";
+  }
+}
+
+constants  {
+  #C1 = 0
+  #C2 = "Enum.e1"
+  #C3 = self::Enum {index:#C1, _name:#C2}
+  #C4 = 1
+  #C5 = "Enum.e2"
+  #C6 = self::Enum {index:#C4, _name:#C5}
+  #C7 = <self::Enum>[#C3, #C6]
+  #C8 = null
+}
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect
new file mode 100644
index 0000000..5051631
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect
@@ -0,0 +1,112 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/switch_nullable_enum.dart:7:5: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// int method1(Enum? e) {
+//     ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Enum extends core::Object /*isEnum*/  {
+  final field core::int index;
+  final field core::String _name;
+  static const field core::List<self::Enum> values = #C7;
+  static const field self::Enum e1 = #C3;
+  static const field self::Enum e2 = #C6;
+  const constructor •(core::int index, core::String _name) → self::Enum
+    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+    ;
+  method toString() → core::String
+    return this.{=self::Enum::_name};
+}
+static method method1(self::Enum? e) → core::int {
+  switch(e) {
+    #L1:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+  }
+  return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/switch_nullable_enum.dart:7:5: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+int method1(Enum? e) {
+    ^" in null;
+}
+static method method2(self::Enum? e) → core::int {
+  switch(e) {
+    #L2:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L3:
+    case #C8:
+      {
+        return 1;
+      }
+  }
+}
+static method method3(self::Enum? e) → core::int {
+  switch(e) {
+    #L4:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L5:
+    default:
+      {
+        return 1;
+      }
+  }
+}
+static method method4(self::Enum? e) → core::int {
+  switch(e) {
+    #L6:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L7:
+    case #C8:
+    default:
+      {
+        return 1;
+      }
+  }
+}
+static method test() → dynamic {
+  self::method1(#C3);
+}
+static method main() → dynamic {
+  self::expect(0, self::method2(#C3));
+  self::expect(0, self::method2(#C6));
+  self::expect(1, self::method2(null));
+  self::expect(0, self::method3(#C3));
+  self::expect(0, self::method3(#C6));
+  self::expect(1, self::method3(null));
+  self::expect(0, self::method4(#C3));
+  self::expect(0, self::method4(#C6));
+  self::expect(1, self::method4(null));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual)) {
+    throw "Expected ${expected}, actual ${actual}.";
+  }
+}
+
+constants  {
+  #C1 = 0
+  #C2 = "Enum.e1"
+  #C3 = self::Enum {index:#C1, _name:#C2}
+  #C4 = 1
+  #C5 = "Enum.e2"
+  #C6 = self::Enum {index:#C4, _name:#C5}
+  #C7 = <self::Enum>[#C3, #C6]
+  #C8 = null
+}
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.textual_outline.expect
new file mode 100644
index 0000000..acc9973
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+enum Enum { e1, e2 }
+int method1(Enum? e) {}
+int method2(Enum? e) {}
+int method3(Enum? e) {}
+int method4(Enum? e) {}
+test() {}
+main() {}
+expect(expected, actual) {}
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..a18d6e9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+enum Enum { e1, e2 }
+expect(expected, actual) {}
+int method1(Enum? e) {}
+int method2(Enum? e) {}
+int method3(Enum? e) {}
+int method4(Enum? e) {}
+main() {}
+test() {}
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.expect
new file mode 100644
index 0000000..43d8018
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.expect
@@ -0,0 +1,112 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/switch_nullable_enum.dart:7:5: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// int method1(Enum? e) {
+//     ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Enum extends core::Object /*isEnum*/  {
+  final field core::int index;
+  final field core::String _name;
+  static const field core::List<self::Enum> values = #C7;
+  static const field self::Enum e1 = #C3;
+  static const field self::Enum e2 = #C6;
+  const constructor •(core::int index, core::String _name) → self::Enum
+    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+    ;
+  method toString() → core::String
+    return this.{=self::Enum::_name};
+}
+static method method1(self::Enum? e) → core::int {
+  switch(e) {
+    #L1:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+  }
+  return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/switch_nullable_enum.dart:7:5: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+int method1(Enum? e) {
+    ^" in null;
+}
+static method method2(self::Enum? e) → core::int {
+  switch(e) {
+    #L2:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L3:
+    case #C8:
+      {
+        return 1;
+      }
+  }
+}
+static method method3(self::Enum? e) → core::int {
+  switch(e) {
+    #L4:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L5:
+    default:
+      {
+        return 1;
+      }
+  }
+}
+static method method4(self::Enum? e) → core::int {
+  switch(e) {
+    #L6:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L7:
+    case #C8:
+    default:
+      {
+        return 1;
+      }
+  }
+}
+static method test() → dynamic {
+  self::method1(#C3);
+}
+static method main() → dynamic {
+  self::expect(0, self::method2(#C3));
+  self::expect(0, self::method2(#C6));
+  self::expect(1, self::method2(null));
+  self::expect(0, self::method3(#C3));
+  self::expect(0, self::method3(#C6));
+  self::expect(1, self::method3(null));
+  self::expect(0, self::method4(#C3));
+  self::expect(0, self::method4(#C6));
+  self::expect(1, self::method4(null));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual)) {
+    throw "Expected ${expected}, actual ${actual}.";
+  }
+}
+
+constants  {
+  #C1 = 0
+  #C2 = "Enum.e1"
+  #C3 = self::Enum {index:#C1, _name:#C2}
+  #C4 = 1
+  #C5 = "Enum.e2"
+  #C6 = self::Enum {index:#C4, _name:#C5}
+  #C7 = <self::Enum*>[#C3, #C6]
+  #C8 = null
+}
diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.transformed.expect
new file mode 100644
index 0000000..43d8018
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.weak.transformed.expect
@@ -0,0 +1,112 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/switch_nullable_enum.dart:7:5: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+// int method1(Enum? e) {
+//     ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Enum extends core::Object /*isEnum*/  {
+  final field core::int index;
+  final field core::String _name;
+  static const field core::List<self::Enum> values = #C7;
+  static const field self::Enum e1 = #C3;
+  static const field self::Enum e2 = #C6;
+  const constructor •(core::int index, core::String _name) → self::Enum
+    : self::Enum::index = index, self::Enum::_name = _name, super core::Object::•()
+    ;
+  method toString() → core::String
+    return this.{=self::Enum::_name};
+}
+static method method1(self::Enum? e) → core::int {
+  switch(e) {
+    #L1:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+  }
+  return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/switch_nullable_enum.dart:7:5: Error: A non-null value must be returned since the return type 'int' doesn't allow null.
+int method1(Enum? e) {
+    ^" in null;
+}
+static method method2(self::Enum? e) → core::int {
+  switch(e) {
+    #L2:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L3:
+    case #C8:
+      {
+        return 1;
+      }
+  }
+}
+static method method3(self::Enum? e) → core::int {
+  switch(e) {
+    #L4:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L5:
+    default:
+      {
+        return 1;
+      }
+  }
+}
+static method method4(self::Enum? e) → core::int {
+  switch(e) {
+    #L6:
+    case #C3:
+    case #C6:
+      {
+        return 0;
+      }
+    #L7:
+    case #C8:
+    default:
+      {
+        return 1;
+      }
+  }
+}
+static method test() → dynamic {
+  self::method1(#C3);
+}
+static method main() → dynamic {
+  self::expect(0, self::method2(#C3));
+  self::expect(0, self::method2(#C6));
+  self::expect(1, self::method2(null));
+  self::expect(0, self::method3(#C3));
+  self::expect(0, self::method3(#C6));
+  self::expect(1, self::method3(null));
+  self::expect(0, self::method4(#C3));
+  self::expect(0, self::method4(#C6));
+  self::expect(1, self::method4(null));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual)) {
+    throw "Expected ${expected}, actual ${actual}.";
+  }
+}
+
+constants  {
+  #C1 = 0
+  #C2 = "Enum.e1"
+  #C3 = self::Enum {index:#C1, _name:#C2}
+  #C4 = 1
+  #C5 = "Enum.e2"
+  #C6 = self::Enum {index:#C4, _name:#C5}
+  #C7 = <self::Enum*>[#C3, #C6]
+  #C8 = null
+}
diff --git a/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart b/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
index 5e18e6f..5cc3962 100644
--- a/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
+++ b/pkg/kernel/lib/transformations/track_widget_constructor_locations.dart
@@ -424,14 +424,8 @@
         }
       }
       if (!hasRedirectingInitializer) {
-        constructor.initializers.add(new FieldInitializer(
-          locationField,
-          clazz.enclosingLibrary.isNonNullableByDefault
-              // The parameter is nullable so that it can be optional but the
-              // field is non-nullable so we check it here.
-              ? new NullCheck(new VariableGet(variable))
-              : new VariableGet(variable),
-        ));
+        constructor.initializers.add(
+            new FieldInitializer(locationField, new VariableGet(variable)));
         // TODO(jacobr): add an assert verifying the locationField is not
         // null. Currently, we cannot safely add this assert because we do not
         // handle Widget classes with optional positional arguments. There are
diff --git a/runtime/vm/type_testing_stubs_test.cc b/runtime/vm/type_testing_stubs_test.cc
index 0a218cb..f260b3f 100644
--- a/runtime/vm/type_testing_stubs_test.cc
+++ b/runtime/vm/type_testing_stubs_test.cc
@@ -679,6 +679,8 @@
 
   const auto& root_library = Library::Handle(LoadTestScript(kScript));
   const auto& class_a = Class::Handle(GetClass(root_library, "A"));
+  ClassFinalizer::FinalizeTypesInClass(class_a);
+
   const auto& fun_generic =
       Function::Handle(GetFunction(root_library, "genericFun"));
 
diff --git a/sdk/lib/ffi/annotations.dart b/sdk/lib/ffi/annotations.dart
index f68e525..1a4bcde 100644
--- a/sdk/lib/ffi/annotations.dart
+++ b/sdk/lib/ffi/annotations.dart
@@ -32,6 +32,5 @@
 /// This [NativeType] does not have predefined size.
 ///
 /// Unsized NativeTypes do not support [sizeOf] because their size is unknown.
-/// Consequently, [allocate], [Pointer.load], [Pointer.store], and
-/// [Pointer.elementAt] are not available.
+/// Consequently, [Pointer.elementAt] is not available.
 const unsized = const Unsized();
diff --git a/tools/VERSION b/tools/VERSION
index b2782a7..5247a95 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 10
 PATCH 0
-PRERELEASE 112
+PRERELEASE 113
 PRERELEASE_PATCH 0
\ No newline at end of file