Version 2.14.0-188.3.beta
* Cherry-pick 303f96d3f38c3455c0e6a4a33c3eded0763464f0 to beta
* Cherry-pick 4c1a153c090e6c99a30fdfa0f2e0dbb34f15df7d to beta
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 90beb07..51181ce 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -2792,6 +2792,20 @@
// FutureOr<T?>? --> FutureOr<T?>
return futureOr.withDeclaredNullability(Nullability.nonNullable);
}
+ // The following is not part of the normalization spec but this is a
+ // convenient place to perform this change of nullability consistently. This
+ // only applies at compile-time and is not needed in the runtime version of
+ // the FutureOr normalization.
+ // FutureOr<T%>% --> FutureOr<T%>
+ //
+ // If the type argument has undetermined nullability the CFE propagates
+ // it to the FutureOr type as well. In this case we can represent the
+ // FutureOr type without any nullability wrappers and rely on the runtime to
+ // handle the nullability of the instantiated type appropriately.
+ if (futureOr.nullability == Nullability.undetermined &&
+ typeArgument.nullability == Nullability.undetermined) {
+ return futureOr.withDeclaredNullability(Nullability.nonNullable);
+ }
return futureOr;
}
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 91da0d0..8736d5a 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -3577,7 +3577,7 @@
// limitation of Kernel.
if (typeParameter != null &&
typeParameter.fileOffset != -1 &&
- typeParameter.parent != null) {
+ typeParameter.location != null) {
// It looks like when parameters come from patch files, they don't
// have a reportable location.
(context ??= <LocatedMessage>[]).add(
diff --git a/tools/VERSION b/tools/VERSION
index ee3df63..d2adf79 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
MINOR 14
PATCH 0
PRERELEASE 188
-PRERELEASE_PATCH 1
\ No newline at end of file
+PRERELEASE_PATCH 3
\ No newline at end of file