From ced5b4e25d32159a7fb609e56831219b472d8f75 Mon Sep 17 00:00:00 2001 From: Johnni Winther Date: Fri, 17 Nov 2023 14:06:50 +0000 Subject: [PATCH] [cfe] Ensure nullable result type for ??= for effect Closes #54069 Change-Id: I4caaad1b86f9ef68f1d36d7b2f9afc92364ce83c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336662 Reviewed-by: Chloe Stefantsova Commit-Queue: Johnni Winther --- .../type_inference/inference_visitor.dart | 2 +- .../test/spell_checking_list_tests.txt | 1 + .../testcases/dart2wasm/issue54069.dart | 22 +++++++++++ .../dart2wasm/issue54069.dart.strong.expect | 26 +++++++++++++ .../issue54069.dart.strong.transformed.expect | 37 +++++++++++++++++++ .../issue54069.dart.textual_outline.expect | 6 +++ ...54069.dart.textual_outline_modelled.expect | 6 +++ .../extensions/null_aware2.dart.strong.expect | 4 +- ...null_aware2.dart.strong.transformed.expect | 4 +- .../extensions/null_aware2.dart.weak.expect | 4 +- .../null_aware2.dart.weak.modular.expect | 4 +- .../null_aware2.dart.weak.transformed.expect | 4 +- .../testcases/general/if_null_assign.dart | 8 ++++ .../general/if_null_assign.dart.strong.expect | 8 ++++ ...null_assign.dart.strong.transformed.expect | 8 ++++ ...if_null_assign.dart.textual_outline.expect | 1 + ...ssign.dart.textual_outline_modelled.expect | 1 + .../general/if_null_assign.dart.weak.expect | 8 ++++ .../if_null_assign.dart.weak.modular.expect | 8 ++++ .../if_null_assign.dart.weak.outline.expect | 6 +++ ...f_null_assign.dart.weak.transformed.expect | 8 ++++ .../invalid_assignment.dart.strong.expect | 4 +- ..._assignment.dart.strong.transformed.expect | 4 +- .../invalid_assignment.dart.weak.expect | 4 +- ...nvalid_assignment.dart.weak.modular.expect | 4 +- ...id_assignment.dart.weak.transformed.expect | 4 +- .../general/null_aware2.dart.strong.expect | 4 +- ...null_aware2.dart.strong.transformed.expect | 4 +- .../general/null_aware2.dart.weak.expect | 4 +- .../null_aware2.dart.weak.modular.expect | 4 +- .../null_aware2.dart.weak.transformed.expect | 4 +- .../no_outline_change_22.yaml.world.1.expect | 4 +- .../no_outline_change_22.yaml.world.2.expect | 4 +- ...ull_aware_static_access.dart.strong.expect | 2 +- ...atic_access.dart.strong.transformed.expect | 2 +- .../null_aware_static_access.dart.weak.expect | 2 +- ...are_static_access.dart.weak.modular.expect | 2 +- ...static_access.dart.weak.transformed.expect | 2 +- .../null_aware_this_access.dart.strong.expect | 2 +- ...this_access.dart.strong.transformed.expect | 2 +- .../null_aware_this_access.dart.weak.expect | 2 +- ...aware_this_access.dart.weak.modular.expect | 2 +- ...e_this_access.dart.weak.transformed.expect | 2 +- ...y_non_nullable_warnings.dart.strong.expect | 2 +- ...le_warnings.dart.strong.transformed.expect | 2 +- ...tly_non_nullable_warnings.dart.weak.expect | 2 +- ...nullable_warnings.dart.weak.modular.expect | 2 +- ...able_warnings.dart.weak.transformed.expect | 2 +- .../unsound_checks.dart.weak.expect | 2 +- .../unsound_checks.dart.weak.modular.expect | 2 +- ...nsound_checks.dart.weak.transformed.expect | 2 +- ...che_lookups.dart.strong.transformed.expect | 4 +- ...cache_lookups.dart.weak.transformed.expect | 4 +- ...g_constants.dart.strong.transformed.expect | 4 +- ...ing_constants.dart.weak.transformed.expect | 4 +- ...lement_once.dart.strong.transformed.expect | 4 +- ..._element_once.dart.weak.transformed.expect | 4 +- ...tive_length.dart.strong.transformed.expect | 4 +- ...gative_length.dart.weak.transformed.expect | 4 +- .../rasta/issue_000081.dart.strong.expect | 2 +- ...ssue_000081.dart.strong.transformed.expect | 2 +- .../rasta/issue_000081.dart.weak.expect | 2 +- .../issue_000081.dart.weak.modular.expect | 2 +- .../issue_000081.dart.weak.transformed.expect | 2 +- .../testcases/rasta/static.dart.strong.expect | 2 +- .../static.dart.strong.transformed.expect | 2 +- .../testcases/rasta/static.dart.weak.expect | 2 +- .../rasta/static.dart.weak.modular.expect | 2 +- .../rasta/static.dart.weak.transformed.expect | 2 +- .../testcases/rasta/super.dart.strong.expect | 2 +- .../super.dart.strong.transformed.expect | 2 +- .../testcases/rasta/super.dart.weak.expect | 2 +- .../rasta/super.dart.weak.modular.expect | 2 +- .../rasta/super.dart.weak.transformed.expect | 2 +- 74 files changed, 238 insertions(+), 84 deletions(-) create mode 100644 pkg/front_end/testcases/dart2wasm/issue54069.dart create mode 100644 pkg/front_end/testcases/dart2wasm/issue54069.dart.strong.expect create mode 100644 pkg/front_end/testcases/dart2wasm/issue54069.dart.strong.transformed.expect create mode 100644 pkg/front_end/testcases/dart2wasm/issue54069.dart.textual_outline.expect create mode 100644 pkg/front_end/testcases/dart2wasm/issue54069.dart.textual_outline_modelled.expect create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart.strong.expect create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart.strong.transformed.expect create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart.textual_outline.expect create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart.textual_outline_modelled.expect create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart.weak.expect create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart.weak.modular.expect create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart.weak.outline.expect create mode 100644 pkg/front_end/testcases/general/if_null_assign.dart.weak.transformed.expect diff --git a/pkg/front_end/lib/src/fasta/type_inference/inference_visitor.dart b/pkg/front_end/lib/src/fasta/type_inference/inference_visitor.dart index bc7432df2fb..d21febf63db 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/inference_visitor.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/inference_visitor.dart @@ -5234,7 +5234,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase equalsNull, writeResult.expression, new NullLiteral()..fileOffset = node.fileOffset, - inferredType) + computeNullable(inferredType)) ..fileOffset = node.fileOffset; } else { // Encode `a ??= b` as: diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt index 55d0542bcfc..e4ea2b77980 100644 --- a/pkg/front_end/test/spell_checking_list_tests.txt +++ b/pkg/front_end/test/spell_checking_list_tests.txt @@ -553,6 +553,7 @@ party pause paused pays +pb pc periodic periodically diff --git a/pkg/front_end/testcases/dart2wasm/issue54069.dart b/pkg/front_end/testcases/dart2wasm/issue54069.dart new file mode 100644 index 00000000000..a0b03298f4f --- /dev/null +++ b/pkg/front_end/testcases/dart2wasm/issue54069.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2023, 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. + +import 'dart:typed_data'; + +Future getBinaryTestProto() => readFileWeb("test.binary.pb"); + +Future readFileWeb(String path) async { + throw ''; +} + +void runBench([Uint8List? data]) async { + data ??= await getBinaryTestProto(); + print(data); +} + +void main() async { + Uint8List data = await getBinaryTestProto(); + print("File successfully read, contents: $data"); + runBench(data); +} diff --git a/pkg/front_end/testcases/dart2wasm/issue54069.dart.strong.expect b/pkg/front_end/testcases/dart2wasm/issue54069.dart.strong.expect new file mode 100644 index 00000000000..c940b009a60 --- /dev/null +++ b/pkg/front_end/testcases/dart2wasm/issue54069.dart.strong.expect @@ -0,0 +1,26 @@ +library; +import self as self; +import "dart:async" as asy; +import "dart:typed_data" as typ; +import "dart:core" as core; + +import "dart:typed_data"; + +static method getBinaryTestProto() → asy::Future + return self::readFileWeb("test.binary.pb"); +static method readFileWeb(core::String path) → asy::Future async /* futureValueType= typ::Uint8List */ { + throw ""; +} +static method runBench([typ::Uint8List? data = #C1]) → void async /* futureValueType= void */ { + data == null ?{typ::Uint8List?} data = await self::getBinaryTestProto() : null; + core::print(data{typ::Uint8List}); +} +static method main() → void async /* futureValueType= void */ { + typ::Uint8List data = await self::getBinaryTestProto(); + core::print("File successfully read, contents: ${data}"); + self::runBench(data); +} + +constants { + #C1 = null +} diff --git a/pkg/front_end/testcases/dart2wasm/issue54069.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2wasm/issue54069.dart.strong.transformed.expect new file mode 100644 index 00000000000..4595cee3a5a --- /dev/null +++ b/pkg/front_end/testcases/dart2wasm/issue54069.dart.strong.transformed.expect @@ -0,0 +1,37 @@ +library; +import self as self; +import "dart:async" as asy; +import "dart:typed_data" as typ; +import "dart:core" as core; + +import "dart:typed_data"; + +static method getBinaryTestProto() → asy::Future + return self::readFileWeb("test.binary.pb"); +static method readFileWeb(core::String path) → asy::Future async /* futureValueType= typ::Uint8List */ { + throw ""; +} +static method runBench([typ::Uint8List? data = #C1]) → void async /* futureValueType= void */ { + typ::Uint8List :async_temporary_0; + typ::Uint8List? :async_temporary_1; + if(data == null) { + :async_temporary_0 = await self::getBinaryTestProto(); + :async_temporary_1 = data = :async_temporary_0 as{ForLegacy} dynamic; + } + else { + :async_temporary_1 = null; + } + :async_temporary_1 as{ForLegacy} dynamic; + core::print(data{typ::Uint8List}); +} +static method main() → void async /* futureValueType= void */ { + typ::Uint8List :async_temporary_0; + :async_temporary_0 = await self::getBinaryTestProto(); + typ::Uint8List data = :async_temporary_0 as{ForLegacy} dynamic; + core::print("File successfully read, contents: ${data}"); + self::runBench(data); +} + +constants { + #C1 = null +} diff --git a/pkg/front_end/testcases/dart2wasm/issue54069.dart.textual_outline.expect b/pkg/front_end/testcases/dart2wasm/issue54069.dart.textual_outline.expect new file mode 100644 index 00000000000..e30902200e3 --- /dev/null +++ b/pkg/front_end/testcases/dart2wasm/issue54069.dart.textual_outline.expect @@ -0,0 +1,6 @@ +import 'dart:typed_data'; + +Future getBinaryTestProto() => readFileWeb("test.binary.pb"); +Future readFileWeb(String path) async {} +void runBench([Uint8List? data]) async {} +void main() async {} diff --git a/pkg/front_end/testcases/dart2wasm/issue54069.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/dart2wasm/issue54069.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..f05c5506c65 --- /dev/null +++ b/pkg/front_end/testcases/dart2wasm/issue54069.dart.textual_outline_modelled.expect @@ -0,0 +1,6 @@ +import 'dart:typed_data'; + +Future getBinaryTestProto() => readFileWeb("test.binary.pb"); +Future readFileWeb(String path) async {} +void main() async {} +void runBench([Uint8List? data]) async {} diff --git a/pkg/front_end/testcases/extensions/null_aware2.dart.strong.expect b/pkg/front_end/testcases/extensions/null_aware2.dart.strong.expect index d9098f93601..ac2f7122414 100644 --- a/pkg/front_end/testcases/extensions/null_aware2.dart.strong.expect +++ b/pkg/front_end/testcases/extensions/null_aware2.dart.strong.expect @@ -67,9 +67,9 @@ static method test2(self::Class? c) → dynamic { self::expect(42, let final self::Class? #t52 = c in #t52 == null ?{core::int?} null : let final core::int? #t53 = self::Extension|get#property(#t52{self::Class}) in #t53 == null ?{core::int} let final core::int #t54 = 87 in let final void #t55 = self::Extension|set#property(#t52{self::Class}, #t54) in #t54 : #t53{core::int}); let final self::Class? #t56 = c in #t56 == null ?{void} null : self::Extension|set#property(#t56{self::Class}, null); self::expect(null, let final self::Class? #t57 = c in #t57 == null ?{core::int?} null : self::Extension|get#property(#t57{self::Class})); - let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int} self::Extension|set#property(#t58{self::Class}, 42) : null; + let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int?} self::Extension|set#property(#t58{self::Class}, 42) : null; self::expect(42, let final self::Class? #t59 = c in #t59 == null ?{core::int?} null : self::Extension|get#property(#t59{self::Class})); - let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int} self::Extension|set#property(#t60{self::Class}, 87) : null; + let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int?} self::Extension|set#property(#t60{self::Class}, 87) : null; self::expect(42, let final self::Class? #t61 = c in #t61 == null ?{core::int?} null : self::Extension|get#property(#t61{self::Class})); let final self::Class? #t62 = c in #t62 == null ?{void} null : self::Extension|set#property(#t62{self::Class}, null); let final self::Class? #t63 = c in #t63 == null ?{dynamic} null : self::Extension|testImplicitThis(#t63{self::Class}); diff --git a/pkg/front_end/testcases/extensions/null_aware2.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/null_aware2.dart.strong.transformed.expect index 890da8e4b2c..72a75b66d6f 100644 --- a/pkg/front_end/testcases/extensions/null_aware2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extensions/null_aware2.dart.strong.transformed.expect @@ -67,9 +67,9 @@ static method test2(self::Class? c) → dynamic { self::expect(42, let final self::Class? #t52 = c in #t52 == null ?{core::int?} null : let final core::int? #t53 = self::Extension|get#property(#t52{self::Class}) in #t53 == null ?{core::int} let final core::int #t54 = 87 in let final void #t55 = self::Extension|set#property(#t52{self::Class}, #t54) in #t54 : #t53{core::int}); let final self::Class? #t56 = c in #t56 == null ?{void} null : self::Extension|set#property(#t56{self::Class}, null); self::expect(null, let final self::Class? #t57 = c in #t57 == null ?{core::int?} null : self::Extension|get#property(#t57{self::Class})); - let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int} self::Extension|set#property(#t58{self::Class}, 42) : null; + let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int?} self::Extension|set#property(#t58{self::Class}, 42) : null; self::expect(42, let final self::Class? #t59 = c in #t59 == null ?{core::int?} null : self::Extension|get#property(#t59{self::Class})); - let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int} self::Extension|set#property(#t60{self::Class}, 87) : null; + let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int?} self::Extension|set#property(#t60{self::Class}, 87) : null; self::expect(42, let final self::Class? #t61 = c in #t61 == null ?{core::int?} null : self::Extension|get#property(#t61{self::Class})); let final self::Class? #t62 = c in #t62 == null ?{void} null : self::Extension|set#property(#t62{self::Class}, null); let final self::Class? #t63 = c in #t63 == null ?{dynamic} null : self::Extension|testImplicitThis(#t63{self::Class}); diff --git a/pkg/front_end/testcases/extensions/null_aware2.dart.weak.expect b/pkg/front_end/testcases/extensions/null_aware2.dart.weak.expect index d9098f93601..ac2f7122414 100644 --- a/pkg/front_end/testcases/extensions/null_aware2.dart.weak.expect +++ b/pkg/front_end/testcases/extensions/null_aware2.dart.weak.expect @@ -67,9 +67,9 @@ static method test2(self::Class? c) → dynamic { self::expect(42, let final self::Class? #t52 = c in #t52 == null ?{core::int?} null : let final core::int? #t53 = self::Extension|get#property(#t52{self::Class}) in #t53 == null ?{core::int} let final core::int #t54 = 87 in let final void #t55 = self::Extension|set#property(#t52{self::Class}, #t54) in #t54 : #t53{core::int}); let final self::Class? #t56 = c in #t56 == null ?{void} null : self::Extension|set#property(#t56{self::Class}, null); self::expect(null, let final self::Class? #t57 = c in #t57 == null ?{core::int?} null : self::Extension|get#property(#t57{self::Class})); - let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int} self::Extension|set#property(#t58{self::Class}, 42) : null; + let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int?} self::Extension|set#property(#t58{self::Class}, 42) : null; self::expect(42, let final self::Class? #t59 = c in #t59 == null ?{core::int?} null : self::Extension|get#property(#t59{self::Class})); - let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int} self::Extension|set#property(#t60{self::Class}, 87) : null; + let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int?} self::Extension|set#property(#t60{self::Class}, 87) : null; self::expect(42, let final self::Class? #t61 = c in #t61 == null ?{core::int?} null : self::Extension|get#property(#t61{self::Class})); let final self::Class? #t62 = c in #t62 == null ?{void} null : self::Extension|set#property(#t62{self::Class}, null); let final self::Class? #t63 = c in #t63 == null ?{dynamic} null : self::Extension|testImplicitThis(#t63{self::Class}); diff --git a/pkg/front_end/testcases/extensions/null_aware2.dart.weak.modular.expect b/pkg/front_end/testcases/extensions/null_aware2.dart.weak.modular.expect index d9098f93601..ac2f7122414 100644 --- a/pkg/front_end/testcases/extensions/null_aware2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/extensions/null_aware2.dart.weak.modular.expect @@ -67,9 +67,9 @@ static method test2(self::Class? c) → dynamic { self::expect(42, let final self::Class? #t52 = c in #t52 == null ?{core::int?} null : let final core::int? #t53 = self::Extension|get#property(#t52{self::Class}) in #t53 == null ?{core::int} let final core::int #t54 = 87 in let final void #t55 = self::Extension|set#property(#t52{self::Class}, #t54) in #t54 : #t53{core::int}); let final self::Class? #t56 = c in #t56 == null ?{void} null : self::Extension|set#property(#t56{self::Class}, null); self::expect(null, let final self::Class? #t57 = c in #t57 == null ?{core::int?} null : self::Extension|get#property(#t57{self::Class})); - let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int} self::Extension|set#property(#t58{self::Class}, 42) : null; + let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int?} self::Extension|set#property(#t58{self::Class}, 42) : null; self::expect(42, let final self::Class? #t59 = c in #t59 == null ?{core::int?} null : self::Extension|get#property(#t59{self::Class})); - let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int} self::Extension|set#property(#t60{self::Class}, 87) : null; + let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int?} self::Extension|set#property(#t60{self::Class}, 87) : null; self::expect(42, let final self::Class? #t61 = c in #t61 == null ?{core::int?} null : self::Extension|get#property(#t61{self::Class})); let final self::Class? #t62 = c in #t62 == null ?{void} null : self::Extension|set#property(#t62{self::Class}, null); let final self::Class? #t63 = c in #t63 == null ?{dynamic} null : self::Extension|testImplicitThis(#t63{self::Class}); diff --git a/pkg/front_end/testcases/extensions/null_aware2.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/null_aware2.dart.weak.transformed.expect index 890da8e4b2c..72a75b66d6f 100644 --- a/pkg/front_end/testcases/extensions/null_aware2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/extensions/null_aware2.dart.weak.transformed.expect @@ -67,9 +67,9 @@ static method test2(self::Class? c) → dynamic { self::expect(42, let final self::Class? #t52 = c in #t52 == null ?{core::int?} null : let final core::int? #t53 = self::Extension|get#property(#t52{self::Class}) in #t53 == null ?{core::int} let final core::int #t54 = 87 in let final void #t55 = self::Extension|set#property(#t52{self::Class}, #t54) in #t54 : #t53{core::int}); let final self::Class? #t56 = c in #t56 == null ?{void} null : self::Extension|set#property(#t56{self::Class}, null); self::expect(null, let final self::Class? #t57 = c in #t57 == null ?{core::int?} null : self::Extension|get#property(#t57{self::Class})); - let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int} self::Extension|set#property(#t58{self::Class}, 42) : null; + let final self::Class? #t58 = c in #t58 == null ?{core::int?} null : self::Extension|get#property(#t58{self::Class}) == null ?{core::int?} self::Extension|set#property(#t58{self::Class}, 42) : null; self::expect(42, let final self::Class? #t59 = c in #t59 == null ?{core::int?} null : self::Extension|get#property(#t59{self::Class})); - let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int} self::Extension|set#property(#t60{self::Class}, 87) : null; + let final self::Class? #t60 = c in #t60 == null ?{core::int?} null : self::Extension|get#property(#t60{self::Class}) == null ?{core::int?} self::Extension|set#property(#t60{self::Class}, 87) : null; self::expect(42, let final self::Class? #t61 = c in #t61 == null ?{core::int?} null : self::Extension|get#property(#t61{self::Class})); let final self::Class? #t62 = c in #t62 == null ?{void} null : self::Extension|set#property(#t62{self::Class}, null); let final self::Class? #t63 = c in #t63 == null ?{dynamic} null : self::Extension|testImplicitThis(#t63{self::Class}); diff --git a/pkg/front_end/testcases/general/if_null_assign.dart b/pkg/front_end/testcases/general/if_null_assign.dart new file mode 100644 index 00000000000..29f16e7fc98 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart @@ -0,0 +1,8 @@ +// Copyright (c) 2023, 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. + +method(int? a, int? b) { + int j = a ??= 0; + b ??= 0; +} diff --git a/pkg/front_end/testcases/general/if_null_assign.dart.strong.expect b/pkg/front_end/testcases/general/if_null_assign.dart.strong.expect new file mode 100644 index 00000000000..3f6267c10f9 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart.strong.expect @@ -0,0 +1,8 @@ +library; +import self as self; +import "dart:core" as core; + +static method method(core::int? a, core::int? b) → dynamic { + core::int j = let final core::int? #t1 = a in #t1 == null ?{core::int} a = 0 : #t1{core::int}; + b == null ?{core::int?} b = 0 : null; +} diff --git a/pkg/front_end/testcases/general/if_null_assign.dart.strong.transformed.expect b/pkg/front_end/testcases/general/if_null_assign.dart.strong.transformed.expect new file mode 100644 index 00000000000..3f6267c10f9 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart.strong.transformed.expect @@ -0,0 +1,8 @@ +library; +import self as self; +import "dart:core" as core; + +static method method(core::int? a, core::int? b) → dynamic { + core::int j = let final core::int? #t1 = a in #t1 == null ?{core::int} a = 0 : #t1{core::int}; + b == null ?{core::int?} b = 0 : null; +} diff --git a/pkg/front_end/testcases/general/if_null_assign.dart.textual_outline.expect b/pkg/front_end/testcases/general/if_null_assign.dart.textual_outline.expect new file mode 100644 index 00000000000..146656cde69 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart.textual_outline.expect @@ -0,0 +1 @@ +method(int? a, int? b) {} diff --git a/pkg/front_end/testcases/general/if_null_assign.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/if_null_assign.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..146656cde69 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart.textual_outline_modelled.expect @@ -0,0 +1 @@ +method(int? a, int? b) {} diff --git a/pkg/front_end/testcases/general/if_null_assign.dart.weak.expect b/pkg/front_end/testcases/general/if_null_assign.dart.weak.expect new file mode 100644 index 00000000000..3f6267c10f9 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart.weak.expect @@ -0,0 +1,8 @@ +library; +import self as self; +import "dart:core" as core; + +static method method(core::int? a, core::int? b) → dynamic { + core::int j = let final core::int? #t1 = a in #t1 == null ?{core::int} a = 0 : #t1{core::int}; + b == null ?{core::int?} b = 0 : null; +} diff --git a/pkg/front_end/testcases/general/if_null_assign.dart.weak.modular.expect b/pkg/front_end/testcases/general/if_null_assign.dart.weak.modular.expect new file mode 100644 index 00000000000..3f6267c10f9 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart.weak.modular.expect @@ -0,0 +1,8 @@ +library; +import self as self; +import "dart:core" as core; + +static method method(core::int? a, core::int? b) → dynamic { + core::int j = let final core::int? #t1 = a in #t1 == null ?{core::int} a = 0 : #t1{core::int}; + b == null ?{core::int?} b = 0 : null; +} diff --git a/pkg/front_end/testcases/general/if_null_assign.dart.weak.outline.expect b/pkg/front_end/testcases/general/if_null_assign.dart.weak.outline.expect new file mode 100644 index 00000000000..db8ef269bc4 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart.weak.outline.expect @@ -0,0 +1,6 @@ +library; +import self as self; +import "dart:core" as core; + +static method method(core::int? a, core::int? b) → dynamic + ; diff --git a/pkg/front_end/testcases/general/if_null_assign.dart.weak.transformed.expect b/pkg/front_end/testcases/general/if_null_assign.dart.weak.transformed.expect new file mode 100644 index 00000000000..3f6267c10f9 --- /dev/null +++ b/pkg/front_end/testcases/general/if_null_assign.dart.weak.transformed.expect @@ -0,0 +1,8 @@ +library; +import self as self; +import "dart:core" as core; + +static method method(core::int? a, core::int? b) → dynamic { + core::int j = let final core::int? #t1 = a in #t1 == null ?{core::int} a = 0 : #t1{core::int}; + b == null ?{core::int?} b = 0 : null; +} diff --git a/pkg/front_end/testcases/general/invalid_assignment.dart.strong.expect b/pkg/front_end/testcases/general/invalid_assignment.dart.strong.expect index 652272751a0..4de6f866da1 100644 --- a/pkg/front_end/testcases/general/invalid_assignment.dart.strong.expect +++ b/pkg/front_end/testcases/general/invalid_assignment.dart.strong.expect @@ -31,9 +31,9 @@ static method test(core::int? i, core::String s, self::A a) → dynamic { i = s; ^" in s as{TypeError} core::int?; i = null; - i == null ?{core::int} i = 1 : null; + i == null ?{core::int?} i = 1 : null; i = null; - i == null ?{core::Object} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. + i == null ?{core::Object?} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. i ??= s; ^" in s as{TypeError} core::int? : null; a = new self::A::•(); diff --git a/pkg/front_end/testcases/general/invalid_assignment.dart.strong.transformed.expect b/pkg/front_end/testcases/general/invalid_assignment.dart.strong.transformed.expect index 652272751a0..4de6f866da1 100644 --- a/pkg/front_end/testcases/general/invalid_assignment.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/invalid_assignment.dart.strong.transformed.expect @@ -31,9 +31,9 @@ static method test(core::int? i, core::String s, self::A a) → dynamic { i = s; ^" in s as{TypeError} core::int?; i = null; - i == null ?{core::int} i = 1 : null; + i == null ?{core::int?} i = 1 : null; i = null; - i == null ?{core::Object} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. + i == null ?{core::Object?} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. i ??= s; ^" in s as{TypeError} core::int? : null; a = new self::A::•(); diff --git a/pkg/front_end/testcases/general/invalid_assignment.dart.weak.expect b/pkg/front_end/testcases/general/invalid_assignment.dart.weak.expect index 652272751a0..4de6f866da1 100644 --- a/pkg/front_end/testcases/general/invalid_assignment.dart.weak.expect +++ b/pkg/front_end/testcases/general/invalid_assignment.dart.weak.expect @@ -31,9 +31,9 @@ static method test(core::int? i, core::String s, self::A a) → dynamic { i = s; ^" in s as{TypeError} core::int?; i = null; - i == null ?{core::int} i = 1 : null; + i == null ?{core::int?} i = 1 : null; i = null; - i == null ?{core::Object} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. + i == null ?{core::Object?} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. i ??= s; ^" in s as{TypeError} core::int? : null; a = new self::A::•(); diff --git a/pkg/front_end/testcases/general/invalid_assignment.dart.weak.modular.expect b/pkg/front_end/testcases/general/invalid_assignment.dart.weak.modular.expect index 652272751a0..4de6f866da1 100644 --- a/pkg/front_end/testcases/general/invalid_assignment.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/invalid_assignment.dart.weak.modular.expect @@ -31,9 +31,9 @@ static method test(core::int? i, core::String s, self::A a) → dynamic { i = s; ^" in s as{TypeError} core::int?; i = null; - i == null ?{core::int} i = 1 : null; + i == null ?{core::int?} i = 1 : null; i = null; - i == null ?{core::Object} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. + i == null ?{core::Object?} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. i ??= s; ^" in s as{TypeError} core::int? : null; a = new self::A::•(); diff --git a/pkg/front_end/testcases/general/invalid_assignment.dart.weak.transformed.expect b/pkg/front_end/testcases/general/invalid_assignment.dart.weak.transformed.expect index 652272751a0..4de6f866da1 100644 --- a/pkg/front_end/testcases/general/invalid_assignment.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/invalid_assignment.dart.weak.transformed.expect @@ -31,9 +31,9 @@ static method test(core::int? i, core::String s, self::A a) → dynamic { i = s; ^" in s as{TypeError} core::int?; i = null; - i == null ?{core::int} i = 1 : null; + i == null ?{core::int?} i = 1 : null; i = null; - i == null ?{core::Object} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. + i == null ?{core::Object?} i = invalid-expression "pkg/front_end/testcases/general/invalid_assignment.dart:15:9: Error: A value of type 'String' can't be assigned to a variable of type 'int?'. i ??= s; ^" in s as{TypeError} core::int? : null; a = new self::A::•(); diff --git a/pkg/front_end/testcases/general/null_aware2.dart.strong.expect b/pkg/front_end/testcases/general/null_aware2.dart.strong.expect index 6d47503b796..0cc2d3b2c2e 100644 --- a/pkg/front_end/testcases/general/null_aware2.dart.strong.expect +++ b/pkg/front_end/testcases/general/null_aware2.dart.strong.expect @@ -65,9 +65,9 @@ static method test() → dynamic { let final self::Foo #t1 = foo in #t1 == null ?{core::int?} null : #t1.{self::Foo::field} = 5; self::Foo::staticField = 5; let final self::Foo #t2 = foo in #t2.{self::Foo::field}{core::int} == null ?{core::int} #t2.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; let final self::Foo #t3 = foo in #t3 == null ?{core::int?} null : #t3.{self::Foo::field}{core::int} == null ?{core::int} #t3.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; core::int intValue = let final core::int #t4 = foo.{self::Foo::field}{core::int} in #t4 == null ?{core::int} 6 : #t4; core::num numValue = let final core::int #t5 = foo.{self::Foo::field}{core::int} in #t5 == null ?{core::num} 4.5 : #t5; } diff --git a/pkg/front_end/testcases/general/null_aware2.dart.strong.transformed.expect b/pkg/front_end/testcases/general/null_aware2.dart.strong.transformed.expect index 6d47503b796..0cc2d3b2c2e 100644 --- a/pkg/front_end/testcases/general/null_aware2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/null_aware2.dart.strong.transformed.expect @@ -65,9 +65,9 @@ static method test() → dynamic { let final self::Foo #t1 = foo in #t1 == null ?{core::int?} null : #t1.{self::Foo::field} = 5; self::Foo::staticField = 5; let final self::Foo #t2 = foo in #t2.{self::Foo::field}{core::int} == null ?{core::int} #t2.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; let final self::Foo #t3 = foo in #t3 == null ?{core::int?} null : #t3.{self::Foo::field}{core::int} == null ?{core::int} #t3.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; core::int intValue = let final core::int #t4 = foo.{self::Foo::field}{core::int} in #t4 == null ?{core::int} 6 : #t4; core::num numValue = let final core::int #t5 = foo.{self::Foo::field}{core::int} in #t5 == null ?{core::num} 4.5 : #t5; } diff --git a/pkg/front_end/testcases/general/null_aware2.dart.weak.expect b/pkg/front_end/testcases/general/null_aware2.dart.weak.expect index 6d47503b796..0cc2d3b2c2e 100644 --- a/pkg/front_end/testcases/general/null_aware2.dart.weak.expect +++ b/pkg/front_end/testcases/general/null_aware2.dart.weak.expect @@ -65,9 +65,9 @@ static method test() → dynamic { let final self::Foo #t1 = foo in #t1 == null ?{core::int?} null : #t1.{self::Foo::field} = 5; self::Foo::staticField = 5; let final self::Foo #t2 = foo in #t2.{self::Foo::field}{core::int} == null ?{core::int} #t2.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; let final self::Foo #t3 = foo in #t3 == null ?{core::int?} null : #t3.{self::Foo::field}{core::int} == null ?{core::int} #t3.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; core::int intValue = let final core::int #t4 = foo.{self::Foo::field}{core::int} in #t4 == null ?{core::int} 6 : #t4; core::num numValue = let final core::int #t5 = foo.{self::Foo::field}{core::int} in #t5 == null ?{core::num} 4.5 : #t5; } diff --git a/pkg/front_end/testcases/general/null_aware2.dart.weak.modular.expect b/pkg/front_end/testcases/general/null_aware2.dart.weak.modular.expect index 6d47503b796..0cc2d3b2c2e 100644 --- a/pkg/front_end/testcases/general/null_aware2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/null_aware2.dart.weak.modular.expect @@ -65,9 +65,9 @@ static method test() → dynamic { let final self::Foo #t1 = foo in #t1 == null ?{core::int?} null : #t1.{self::Foo::field} = 5; self::Foo::staticField = 5; let final self::Foo #t2 = foo in #t2.{self::Foo::field}{core::int} == null ?{core::int} #t2.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; let final self::Foo #t3 = foo in #t3 == null ?{core::int?} null : #t3.{self::Foo::field}{core::int} == null ?{core::int} #t3.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; core::int intValue = let final core::int #t4 = foo.{self::Foo::field}{core::int} in #t4 == null ?{core::int} 6 : #t4; core::num numValue = let final core::int #t5 = foo.{self::Foo::field}{core::int} in #t5 == null ?{core::num} 4.5 : #t5; } diff --git a/pkg/front_end/testcases/general/null_aware2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/null_aware2.dart.weak.transformed.expect index 6d47503b796..0cc2d3b2c2e 100644 --- a/pkg/front_end/testcases/general/null_aware2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/null_aware2.dart.weak.transformed.expect @@ -65,9 +65,9 @@ static method test() → dynamic { let final self::Foo #t1 = foo in #t1 == null ?{core::int?} null : #t1.{self::Foo::field} = 5; self::Foo::staticField = 5; let final self::Foo #t2 = foo in #t2.{self::Foo::field}{core::int} == null ?{core::int} #t2.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; let final self::Foo #t3 = foo in #t3 == null ?{core::int?} null : #t3.{self::Foo::field}{core::int} == null ?{core::int} #t3.{self::Foo::field} = 5 : null; - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 5 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 5 : null; core::int intValue = let final core::int #t4 = foo.{self::Foo::field}{core::int} in #t4 == null ?{core::int} 6 : #t4; core::num numValue = let final core::int #t5 = foo.{self::Foo::field}{core::int} in #t5 == null ?{core::num} 4.5 : #t5; } diff --git a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect index 4dc35a3e635..6fe4b64bc11 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.1.expect @@ -283,7 +283,7 @@ library from "org-dartlang-test:///main.dart" as main { dart._internal::Sort::sort(this, let final (dart.core::int, dart.core::int) →? dart.core::int #t4 = compare in #t4 == null ?{(dart.core::int, dart.core::int) → dart.core::int} #C6 : #t4{(dart.core::int, dart.core::int) → dart.core::int}); } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([dart.math::Random? random = #C2]) → void { - random == null ?{dart.math::Random} random = dart.math::Random::•() : null; + random == null ?{dart.math::Random?} random = dart.math::Random::•() : null; dart.core::int length = this.{dart.core::List::length}{dart.core::int}; while (length.{dart.core::num::>}(1){(dart.core::num) → dart.core::bool}) { dart.core::int pos = random{dart.math::Random}.{dart.math::Random::nextInt}(length){(dart.core::int) → dart.core::int}; @@ -303,7 +303,7 @@ library from "org-dartlang-test:///main.dart" as main { } =>#t5; method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(dart.core::int start, [dart.core::int? end = #C2]) → dart.core::List { dart.core::int listLength = this.{dart.core::List::length}{dart.core::int}; - end == null ?{dart.core::int} end = listLength : null; + end == null ?{dart.core::int?} end = listLength : null; dart.core::RangeError::checkValidRange(start, end{dart.core::int}, listLength); return dart.core::List::from(this.{dart.collection::ListBase::getRange}(start, end{dart.core::int}){(dart.core::int, dart.core::int) → dart.core::Iterable}); } diff --git a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect index 4dc35a3e635..6fe4b64bc11 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_22.yaml.world.2.expect @@ -283,7 +283,7 @@ library from "org-dartlang-test:///main.dart" as main { dart._internal::Sort::sort(this, let final (dart.core::int, dart.core::int) →? dart.core::int #t4 = compare in #t4 == null ?{(dart.core::int, dart.core::int) → dart.core::int} #C6 : #t4{(dart.core::int, dart.core::int) → dart.core::int}); } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([dart.math::Random? random = #C2]) → void { - random == null ?{dart.math::Random} random = dart.math::Random::•() : null; + random == null ?{dart.math::Random?} random = dart.math::Random::•() : null; dart.core::int length = this.{dart.core::List::length}{dart.core::int}; while (length.{dart.core::num::>}(1){(dart.core::num) → dart.core::bool}) { dart.core::int pos = random{dart.math::Random}.{dart.math::Random::nextInt}(length){(dart.core::int) → dart.core::int}; @@ -303,7 +303,7 @@ library from "org-dartlang-test:///main.dart" as main { } =>#t5; method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(dart.core::int start, [dart.core::int? end = #C2]) → dart.core::List { dart.core::int listLength = this.{dart.core::List::length}{dart.core::int}; - end == null ?{dart.core::int} end = listLength : null; + end == null ?{dart.core::int?} end = listLength : null; dart.core::RangeError::checkValidRange(start, end{dart.core::int}, listLength); return dart.core::List::from(this.{dart.collection::ListBase::getRange}(start, end{dart.core::int}){(dart.core::int, dart.core::int) → dart.core::Iterable}); } diff --git a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.strong.expect b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.strong.expect index 78331865baf..8dabc51d324 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.strong.expect @@ -91,7 +91,7 @@ static method main() → void { self::C::property.{core::List::[]}(0){(core::int) → core::int}; self::C::property.{core::List::[]=}(0, 0){(core::int, core::int) → void}; let final core::Map #t1 = self::C::property2 in let final core::int #t2 = 0 in #t1.{core::Map::[]}(#t2){(core::Object?) → core::int?} == null ?{core::int} #t1.{core::Map::[]=}(#t2, 0){(core::int, core::int?) → void} : null; - self::C::staticMember2 == null ?{core::int} self::C::staticMember2 = 42 : null; + self::C::staticMember2 == null ?{core::int?} self::C::staticMember2 = 42 : null; self::C::staticMember = self::C::staticMember.{core::num::+}(2){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::+}(1){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.strong.transformed.expect index 192a07a2530..c3f26ad8135 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.strong.transformed.expect @@ -91,7 +91,7 @@ static method main() → void { self::C::property.{core::List::[]}(0){(core::int) → core::int}; self::C::property.{core::List::[]=}(0, 0){(core::int, core::int) → void}; let final core::Map #t1 = self::C::property2 in let final core::int #t2 = 0 in #t1.{core::Map::[]}(#t2){(core::Object?) → core::int?} == null ?{core::int} #t1.{core::Map::[]=}(#t2, 0){(core::int, core::int?) → void} : null; - self::C::staticMember2 == null ?{core::int} self::C::staticMember2 = 42 : null; + self::C::staticMember2 == null ?{core::int?} self::C::staticMember2 = 42 : null; self::C::staticMember = self::C::staticMember.{core::num::+}(2){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::+}(1){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.expect b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.expect index 78331865baf..8dabc51d324 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.expect @@ -91,7 +91,7 @@ static method main() → void { self::C::property.{core::List::[]}(0){(core::int) → core::int}; self::C::property.{core::List::[]=}(0, 0){(core::int, core::int) → void}; let final core::Map #t1 = self::C::property2 in let final core::int #t2 = 0 in #t1.{core::Map::[]}(#t2){(core::Object?) → core::int?} == null ?{core::int} #t1.{core::Map::[]=}(#t2, 0){(core::int, core::int?) → void} : null; - self::C::staticMember2 == null ?{core::int} self::C::staticMember2 = 42 : null; + self::C::staticMember2 == null ?{core::int?} self::C::staticMember2 = 42 : null; self::C::staticMember = self::C::staticMember.{core::num::+}(2){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::+}(1){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.modular.expect index 78331865baf..8dabc51d324 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.modular.expect @@ -91,7 +91,7 @@ static method main() → void { self::C::property.{core::List::[]}(0){(core::int) → core::int}; self::C::property.{core::List::[]=}(0, 0){(core::int, core::int) → void}; let final core::Map #t1 = self::C::property2 in let final core::int #t2 = 0 in #t1.{core::Map::[]}(#t2){(core::Object?) → core::int?} == null ?{core::int} #t1.{core::Map::[]=}(#t2, 0){(core::int, core::int?) → void} : null; - self::C::staticMember2 == null ?{core::int} self::C::staticMember2 = 42 : null; + self::C::staticMember2 == null ?{core::int?} self::C::staticMember2 = 42 : null; self::C::staticMember = self::C::staticMember.{core::num::+}(2){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::+}(1){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.transformed.expect index 192a07a2530..c3f26ad8135 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_static_access.dart.weak.transformed.expect @@ -91,7 +91,7 @@ static method main() → void { self::C::property.{core::List::[]}(0){(core::int) → core::int}; self::C::property.{core::List::[]=}(0, 0){(core::int, core::int) → void}; let final core::Map #t1 = self::C::property2 in let final core::int #t2 = 0 in #t1.{core::Map::[]}(#t2){(core::Object?) → core::int?} == null ?{core::int} #t1.{core::Map::[]=}(#t2, 0){(core::int, core::int?) → void} : null; - self::C::staticMember2 == null ?{core::int} self::C::staticMember2 = 42 : null; + self::C::staticMember2 == null ?{core::int?} self::C::staticMember2 = 42 : null; self::C::staticMember = self::C::staticMember.{core::num::+}(2){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::+}(1){(core::num) → core::int}; self::C::staticMember = self::C::staticMember.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.strong.expect b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.strong.expect index c28a40a5743..c68216bc198 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.strong.expect @@ -135,7 +135,7 @@ class C extends core::Object { this.{self::C::property}{self::C}.{self::C::[]}(0){(core::int) → core::int?}; this.{self::C::property}{self::C}.{self::C::[]=}(0, 0){(core::int, core::int) → void}; let final self::C #t2 = this.{self::C::property}{self::C} in let final core::int #t3 = 0 in #t2.{self::C::[]}(#t3){(core::int) → core::int?} == null ?{core::int} #t2.{self::C::[]=}(#t3, 0){(core::int, core::int) → void} : null; - this.{self::C::m1}{core::int?} == null ?{core::int} this.{self::C::m1} = 42 : null; + this.{self::C::m1}{core::int?} == null ?{core::int?} this.{self::C::m1} = 42 : null; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(2){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(1){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.strong.transformed.expect index dfe3be0ae9d..06ed08232a5 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.strong.transformed.expect @@ -135,7 +135,7 @@ class C extends core::Object { this.{self::C::property}{self::C}.{self::C::[]}(0){(core::int) → core::int?}; this.{self::C::property}{self::C}.{self::C::[]=}(0, 0){(core::int, core::int) → void}; let final self::C #t2 = this.{self::C::property}{self::C} in let final core::int #t3 = 0 in #t2.{self::C::[]}(#t3){(core::int) → core::int?} == null ?{core::int} #t2.{self::C::[]=}(#t3, 0){(core::int, core::int) → void} : null; - this.{self::C::m1}{core::int?} == null ?{core::int} this.{self::C::m1} = 42 : null; + this.{self::C::m1}{core::int?} == null ?{core::int?} this.{self::C::m1} = 42 : null; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(2){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(1){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.expect b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.expect index c28a40a5743..c68216bc198 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.expect @@ -135,7 +135,7 @@ class C extends core::Object { this.{self::C::property}{self::C}.{self::C::[]}(0){(core::int) → core::int?}; this.{self::C::property}{self::C}.{self::C::[]=}(0, 0){(core::int, core::int) → void}; let final self::C #t2 = this.{self::C::property}{self::C} in let final core::int #t3 = 0 in #t2.{self::C::[]}(#t3){(core::int) → core::int?} == null ?{core::int} #t2.{self::C::[]=}(#t3, 0){(core::int, core::int) → void} : null; - this.{self::C::m1}{core::int?} == null ?{core::int} this.{self::C::m1} = 42 : null; + this.{self::C::m1}{core::int?} == null ?{core::int?} this.{self::C::m1} = 42 : null; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(2){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(1){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.modular.expect index c28a40a5743..c68216bc198 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.modular.expect @@ -135,7 +135,7 @@ class C extends core::Object { this.{self::C::property}{self::C}.{self::C::[]}(0){(core::int) → core::int?}; this.{self::C::property}{self::C}.{self::C::[]=}(0, 0){(core::int, core::int) → void}; let final self::C #t2 = this.{self::C::property}{self::C} in let final core::int #t3 = 0 in #t2.{self::C::[]}(#t3){(core::int) → core::int?} == null ?{core::int} #t2.{self::C::[]=}(#t3, 0){(core::int, core::int) → void} : null; - this.{self::C::m1}{core::int?} == null ?{core::int} this.{self::C::m1} = 42 : null; + this.{self::C::m1}{core::int?} == null ?{core::int?} this.{self::C::m1} = 42 : null; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(2){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(1){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.transformed.expect index dfe3be0ae9d..06ed08232a5 100644 --- a/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_aware_this_access.dart.weak.transformed.expect @@ -135,7 +135,7 @@ class C extends core::Object { this.{self::C::property}{self::C}.{self::C::[]}(0){(core::int) → core::int?}; this.{self::C::property}{self::C}.{self::C::[]=}(0, 0){(core::int, core::int) → void}; let final self::C #t2 = this.{self::C::property}{self::C} in let final core::int #t3 = 0 in #t2.{self::C::[]}(#t3){(core::int) → core::int?} == null ?{core::int} #t2.{self::C::[]=}(#t3, 0){(core::int, core::int) → void} : null; - this.{self::C::m1}{core::int?} == null ?{core::int} this.{self::C::m1} = 42 : null; + this.{self::C::m1}{core::int?} == null ?{core::int?} this.{self::C::m1} = 42 : null; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(2){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::+}(1){(core::num) → core::int}; this.{self::C::m2} = this.{self::C::m2}{core::int}.{core::num::-}(1){(core::num) → core::int}; diff --git a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.expect b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.expect index c90185409e2..1eae8d381ed 100644 --- a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.expect @@ -136,7 +136,7 @@ static method warning(core::String s, core::List l, core::Map#t3; let final core::String #t4 = s in #t4 == null ?{core::String} "foo" : #t4; - s == null ?{core::String} s = "foo" : null; + s == null ?{core::String?} s = "foo" : null; { final core::List #t5 = []; final core::Iterable? #t6 = l; diff --git a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.transformed.expect index 2bd174e8650..7c66b7472a6 100644 --- a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.strong.transformed.expect @@ -136,7 +136,7 @@ static method warning(core::String s, core::List l, core::Map#t3; let final core::String #t4 = s in #t4 == null ?{core::String} "foo" : #t4; - s == null ?{core::String} s = "foo" : null; + s == null ?{core::String?} s = "foo" : null; { final core::List #t5 = core::_GrowableList::•(0); final core::Iterable? #t6 = l; diff --git a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.expect b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.expect index c90185409e2..1eae8d381ed 100644 --- a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.expect @@ -136,7 +136,7 @@ static method warning(core::String s, core::List l, core::Map#t3; let final core::String #t4 = s in #t4 == null ?{core::String} "foo" : #t4; - s == null ?{core::String} s = "foo" : null; + s == null ?{core::String?} s = "foo" : null; { final core::List #t5 = []; final core::Iterable? #t6 = l; diff --git a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.modular.expect index c90185409e2..1eae8d381ed 100644 --- a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.modular.expect @@ -136,7 +136,7 @@ static method warning(core::String s, core::List l, core::Map#t3; let final core::String #t4 = s in #t4 == null ?{core::String} "foo" : #t4; - s == null ?{core::String} s = "foo" : null; + s == null ?{core::String?} s = "foo" : null; { final core::List #t5 = []; final core::Iterable? #t6 = l; diff --git a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.transformed.expect index 2bd174e8650..7c66b7472a6 100644 --- a/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart.weak.transformed.expect @@ -136,7 +136,7 @@ static method warning(core::String s, core::List l, core::Map#t3; let final core::String #t4 = s in #t4 == null ?{core::String} "foo" : #t4; - s == null ?{core::String} s = "foo" : null; + s == null ?{core::String?} s = "foo" : null; { final core::List #t5 = core::_GrowableList::•(0); final core::Iterable? #t6 = l; diff --git a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.expect index d6267eb7d5c..25747057bc7 100644 --- a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.expect @@ -478,7 +478,7 @@ static method ifNullPropertySetOptInForEffect(core::int i) → dynamic { static method ifNullSetOptIn(core::int i) → dynamic return let final core::int #t65 = i in #t65 == null ?{core::int} i = 42 : #t65; static method ifNullSetOptInForEffect(core::int i) → dynamic { - i == null ?{core::int} i = 42 : null; + i == null ?{core::int?} i = 42 : null; } static method ifNullSuperIndexSetOptIn(core::int i) → dynamic return new uns::OptInClass4::•().{uns::OptInClass4::method}(i){(core::int) → dynamic}; diff --git a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.modular.expect index d6267eb7d5c..25747057bc7 100644 --- a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.modular.expect @@ -478,7 +478,7 @@ static method ifNullPropertySetOptInForEffect(core::int i) → dynamic { static method ifNullSetOptIn(core::int i) → dynamic return let final core::int #t65 = i in #t65 == null ?{core::int} i = 42 : #t65; static method ifNullSetOptInForEffect(core::int i) → dynamic { - i == null ?{core::int} i = 42 : null; + i == null ?{core::int?} i = 42 : null; } static method ifNullSuperIndexSetOptIn(core::int i) → dynamic return new uns::OptInClass4::•().{uns::OptInClass4::method}(i){(core::int) → dynamic}; diff --git a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.transformed.expect index 00d75df28f6..8a70db64e4e 100644 --- a/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd_mixed/unsound_checks.dart.weak.transformed.expect @@ -478,7 +478,7 @@ static method ifNullPropertySetOptInForEffect(core::int i) → dynamic { static method ifNullSetOptIn(core::int i) → dynamic return let final core::int #t65 = i in #t65 == null ?{core::int} i = 42 : #t65; static method ifNullSetOptInForEffect(core::int i) → dynamic { - i == null ?{core::int} i = 42 : null; + i == null ?{core::int?} i = 42 : null; } static method ifNullSuperIndexSetOptIn(core::int i) → dynamic return new uns::OptInClass4::•().{uns::OptInClass4::method}(i){(core::int) → dynamic}; diff --git a/pkg/front_end/testcases/patterns/cache_lookups.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/cache_lookups.dart.strong.transformed.expect index fac8007bbee..a79230a7492 100644 --- a/pkg/front_end/testcases/patterns/cache_lookups.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/cache_lookups.dart.strong.transformed.expect @@ -358,7 +358,7 @@ abstract class _CustomList&Object&ListMixin e _in::Sort::sort(this, let final (cac::_CustomList&Object&ListMixin::E%, cac::_CustomList&Object&ListMixin::E%) →? core::int #t6 = compare in #t6 == null ?{(cac::_CustomList&Object&ListMixin::E%, cac::_CustomList&Object&ListMixin::E%) → core::int} #C9 : #t6{(cac::_CustomList&Object&ListMixin::E%, cac::_CustomList&Object&ListMixin::E%) → core::int}); } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([math::Random? random = #C5]) → void { - random == null ?{math::Random} random = math::Random::•() : null; + random == null ?{math::Random?} random = math::Random::•() : null; core::int length = this.{core::List::length}{core::int}; while (length.{core::num::>}(1){(core::num) → core::bool}) { core::int pos = random{math::Random}.{math::Random::nextInt}(length){(core::int) → core::int}; @@ -378,7 +378,7 @@ abstract class _CustomList&Object&ListMixin e } =>#t7; method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(core::int start, [core::int? end = #C5]) → core::List { core::int listLength = this.{core::List::length}{core::int}; - end == null ?{core::int} end = listLength : null; + end == null ?{core::int?} end = listLength : null; core::RangeError::checkValidRange(start, end{core::int}, listLength); return core::List::from(this.{col::ListBase::getRange}(start, end{core::int}){(core::int, core::int) → core::Iterable}); } diff --git a/pkg/front_end/testcases/patterns/cache_lookups.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/cache_lookups.dart.weak.transformed.expect index 80217666459..22fbb788880 100644 --- a/pkg/front_end/testcases/patterns/cache_lookups.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/patterns/cache_lookups.dart.weak.transformed.expect @@ -358,7 +358,7 @@ abstract class _CustomList&Object&ListMixin e _in::Sort::sort(this, let final (cac::_CustomList&Object&ListMixin::E%, cac::_CustomList&Object&ListMixin::E%) →? core::int #t6 = compare in #t6 == null ?{(cac::_CustomList&Object&ListMixin::E%, cac::_CustomList&Object&ListMixin::E%) → core::int} #C9 : #t6{(cac::_CustomList&Object&ListMixin::E%, cac::_CustomList&Object&ListMixin::E%) → core::int}); } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([math::Random? random = #C5]) → void { - random == null ?{math::Random} random = math::Random::•() : null; + random == null ?{math::Random?} random = math::Random::•() : null; core::int length = this.{core::List::length}{core::int}; while (length.{core::num::>}(1){(core::num) → core::bool}) { core::int pos = random{math::Random}.{math::Random::nextInt}(length){(core::int) → core::int}; @@ -378,7 +378,7 @@ abstract class _CustomList&Object&ListMixin e } =>#t7; method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(core::int start, [core::int? end = #C5]) → core::List { core::int listLength = this.{core::List::length}{core::int}; - end == null ?{core::int} end = listLength : null; + end == null ?{core::int?} end = listLength : null; core::RangeError::checkValidRange(start, end{core::int}, listLength); return core::List::from(this.{col::ListBase::getRange}(start, end{core::int}){(core::int, core::int) → core::Iterable}); } diff --git a/pkg/front_end/testcases/patterns/caching_constants.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/caching_constants.dart.strong.transformed.expect index 9cb0ea1f9bb..d3a68a3c1c2 100644 --- a/pkg/front_end/testcases/patterns/caching_constants.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/caching_constants.dart.strong.transformed.expect @@ -161,8 +161,8 @@ abstract class _MyMap&Object&MapMixin map, core::Iterable iterable, (core::Object?) →? core::Object? key, (core::Object?) →? core::Object? value) → void { - key == null ?{(core::Object?) → core::Object?} key = #C2 : null; - value == null ?{(core::Object?) → core::Object?} value = #C2 : null; + key == null ?{(core::Object?) →? core::Object?} key = #C2 : null; + value == null ?{(core::Object?) →? core::Object?} value = #C2 : null; { synthesized core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { diff --git a/pkg/front_end/testcases/patterns/caching_constants.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/caching_constants.dart.weak.transformed.expect index 55029a66b1a..7af2669ff11 100644 --- a/pkg/front_end/testcases/patterns/caching_constants.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/patterns/caching_constants.dart.weak.transformed.expect @@ -161,8 +161,8 @@ abstract class _MyMap&Object&MapMixin map, core::Iterable iterable, (core::Object?) →? core::Object? key, (core::Object?) →? core::Object? value) → void { - key == null ?{(core::Object?) → core::Object?} key = #C2 : null; - value == null ?{(core::Object?) → core::Object?} value = #C2 : null; + key == null ?{(core::Object?) →? core::Object?} key = #C2 : null; + value == null ?{(core::Object?) →? core::Object?} value = #C2 : null; { synthesized core::Iterator :sync-for-iterator = iterable.{core::Iterable::iterator}{core::Iterator}; for (; :sync-for-iterator.{core::Iterator::moveNext}(){() → core::bool}; ) { diff --git a/pkg/front_end/testcases/patterns/matching_and_capturing_accesses_list_element_once.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/matching_and_capturing_accesses_list_element_once.dart.strong.transformed.expect index b5080701d93..22d445f0952 100644 --- a/pkg/front_end/testcases/patterns/matching_and_capturing_accesses_list_element_once.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/matching_and_capturing_accesses_list_element_once.dart.strong.transformed.expect @@ -287,7 +287,7 @@ abstract class _A&Object&ListMixin extends core::Object implements col::ListBase _in::Sort::sort(this, let final (core::int, core::int) →? core::int #t4 = compare in #t4 == null ?{(core::int, core::int) → core::int} #C6 : #t4{(core::int, core::int) → core::int}); } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([math::Random? random = #C2]) → void { - random == null ?{math::Random} random = math::Random::•() : null; + random == null ?{math::Random?} random = math::Random::•() : null; core::int length = this.{core::List::length}{core::int}; while (length.{core::num::>}(1){(core::num) → core::bool}) { core::int pos = random{math::Random}.{math::Random::nextInt}(length){(core::int) → core::int}; @@ -307,7 +307,7 @@ abstract class _A&Object&ListMixin extends core::Object implements col::ListBase } =>#t5; method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(core::int start, [core::int? end = #C2]) → core::List { core::int listLength = this.{core::List::length}{core::int}; - end == null ?{core::int} end = listLength : null; + end == null ?{core::int?} end = listLength : null; core::RangeError::checkValidRange(start, end{core::int}, listLength); return core::List::from(this.{col::ListBase::getRange}(start, end{core::int}){(core::int, core::int) → core::Iterable}); } diff --git a/pkg/front_end/testcases/patterns/matching_and_capturing_accesses_list_element_once.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/matching_and_capturing_accesses_list_element_once.dart.weak.transformed.expect index e9c9d92a64c..d565cad890c 100644 --- a/pkg/front_end/testcases/patterns/matching_and_capturing_accesses_list_element_once.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/patterns/matching_and_capturing_accesses_list_element_once.dart.weak.transformed.expect @@ -287,7 +287,7 @@ abstract class _A&Object&ListMixin extends core::Object implements col::ListBase _in::Sort::sort(this, let final (core::int, core::int) →? core::int #t4 = compare in #t4 == null ?{(core::int, core::int) → core::int} #C6 : #t4{(core::int, core::int) → core::int}); } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([math::Random? random = #C2]) → void { - random == null ?{math::Random} random = math::Random::•() : null; + random == null ?{math::Random?} random = math::Random::•() : null; core::int length = this.{core::List::length}{core::int}; while (length.{core::num::>}(1){(core::num) → core::bool}) { core::int pos = random{math::Random}.{math::Random::nextInt}(length){(core::int) → core::int}; @@ -307,7 +307,7 @@ abstract class _A&Object&ListMixin extends core::Object implements col::ListBase } =>#t5; method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(core::int start, [core::int? end = #C2]) → core::List { core::int listLength = this.{core::List::length}{core::int}; - end == null ?{core::int} end = listLength : null; + end == null ?{core::int?} end = listLength : null; core::RangeError::checkValidRange(start, end{core::int}, listLength); return core::List::from(this.{col::ListBase::getRange}(start, end{core::int}){(core::int, core::int) → core::Iterable}); } diff --git a/pkg/front_end/testcases/patterns/negative_length.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/negative_length.dart.strong.transformed.expect index e4fecff5db1..89ce38c52ae 100644 --- a/pkg/front_end/testcases/patterns/negative_length.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/negative_length.dart.strong.transformed.expect @@ -287,7 +287,7 @@ abstract class _NegativeLengthList&Object&ListMixin(this, let final (self::_NegativeLengthList&Object&ListMixin::E%, self::_NegativeLengthList&Object&ListMixin::E%) →? core::int #t4 = compare in #t4 == null ?{(self::_NegativeLengthList&Object&ListMixin::E%, self::_NegativeLengthList&Object&ListMixin::E%) → core::int} #C6 : #t4{(self::_NegativeLengthList&Object&ListMixin::E%, self::_NegativeLengthList&Object&ListMixin::E%) → core::int}); } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([math::Random? random = #C2]) → void { - random == null ?{math::Random} random = math::Random::•() : null; + random == null ?{math::Random?} random = math::Random::•() : null; core::int length = this.{core::List::length}{core::int}; while (length.{core::num::>}(1){(core::num) → core::bool}) { core::int pos = random{math::Random}.{math::Random::nextInt}(length){(core::int) → core::int}; @@ -307,7 +307,7 @@ abstract class _NegativeLengthList&Object&ListMixin#t5; method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(core::int start, [core::int? end = #C2]) → core::List { core::int listLength = this.{core::List::length}{core::int}; - end == null ?{core::int} end = listLength : null; + end == null ?{core::int?} end = listLength : null; core::RangeError::checkValidRange(start, end{core::int}, listLength); return core::List::from(this.{col::ListBase::getRange}(start, end{core::int}){(core::int, core::int) → core::Iterable}); } diff --git a/pkg/front_end/testcases/patterns/negative_length.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/negative_length.dart.weak.transformed.expect index 15443d83068..118c6c968db 100644 --- a/pkg/front_end/testcases/patterns/negative_length.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/patterns/negative_length.dart.weak.transformed.expect @@ -287,7 +287,7 @@ abstract class _NegativeLengthList&Object&ListMixin(this, let final (self::_NegativeLengthList&Object&ListMixin::E%, self::_NegativeLengthList&Object&ListMixin::E%) →? core::int #t4 = compare in #t4 == null ?{(self::_NegativeLengthList&Object&ListMixin::E%, self::_NegativeLengthList&Object&ListMixin::E%) → core::int} #C6 : #t4{(self::_NegativeLengthList&Object&ListMixin::E%, self::_NegativeLengthList&Object&ListMixin::E%) → core::int}); } method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ shuffle([math::Random? random = #C2]) → void { - random == null ?{math::Random} random = math::Random::•() : null; + random == null ?{math::Random?} random = math::Random::•() : null; core::int length = this.{core::List::length}{core::int}; while (length.{core::num::>}(1){(core::num) → core::bool}) { core::int pos = random{math::Random}.{math::Random::nextInt}(length){(core::int) → core::int}; @@ -307,7 +307,7 @@ abstract class _NegativeLengthList&Object&ListMixin#t5; method /* from org-dartlang-sdk:///sdk/lib/collection/list.dart */ sublist(core::int start, [core::int? end = #C2]) → core::List { core::int listLength = this.{core::List::length}{core::int}; - end == null ?{core::int} end = listLength : null; + end == null ?{core::int?} end = listLength : null; core::RangeError::checkValidRange(start, end{core::int}, listLength); return core::List::from(this.{col::ListBase::getRange}(start, end{core::int}){(core::int, core::int) → core::Iterable}); } diff --git a/pkg/front_end/testcases/rasta/issue_000081.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000081.dart.strong.expect index e3437dd0d9a..23cfff22715 100644 --- a/pkg/front_end/testcases/rasta/issue_000081.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/issue_000081.dart.strong.expect @@ -16,7 +16,7 @@ class Sub extends self::Base { get hashCode() → core::int return let final core::int? #t1 = this.{self::Sub::_hashCode}{core::int?} in #t1 == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : #t1{core::int}; method foo() → dynamic { - this.{self::Sub::_hashCode}{core::int?} == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; + this.{self::Sub::_hashCode}{core::int?} == null ?{core::int?} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; } } static method main() → dynamic { diff --git a/pkg/front_end/testcases/rasta/issue_000081.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000081.dart.strong.transformed.expect index e863deae59c..a9787107fef 100644 --- a/pkg/front_end/testcases/rasta/issue_000081.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/issue_000081.dart.strong.transformed.expect @@ -16,7 +16,7 @@ class Sub extends self::Base { get hashCode() → core::int return let final core::int? #t1 = this.{self::Sub::_hashCode}{core::int?} in #t1 == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : #t1{core::int}; method foo() → dynamic { - this.{self::Sub::_hashCode}{core::int?} == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; + this.{self::Sub::_hashCode}{core::int?} == null ?{core::int?} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; } } static method main() → dynamic { diff --git a/pkg/front_end/testcases/rasta/issue_000081.dart.weak.expect b/pkg/front_end/testcases/rasta/issue_000081.dart.weak.expect index e3437dd0d9a..23cfff22715 100644 --- a/pkg/front_end/testcases/rasta/issue_000081.dart.weak.expect +++ b/pkg/front_end/testcases/rasta/issue_000081.dart.weak.expect @@ -16,7 +16,7 @@ class Sub extends self::Base { get hashCode() → core::int return let final core::int? #t1 = this.{self::Sub::_hashCode}{core::int?} in #t1 == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : #t1{core::int}; method foo() → dynamic { - this.{self::Sub::_hashCode}{core::int?} == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; + this.{self::Sub::_hashCode}{core::int?} == null ?{core::int?} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; } } static method main() → dynamic { diff --git a/pkg/front_end/testcases/rasta/issue_000081.dart.weak.modular.expect b/pkg/front_end/testcases/rasta/issue_000081.dart.weak.modular.expect index e3437dd0d9a..23cfff22715 100644 --- a/pkg/front_end/testcases/rasta/issue_000081.dart.weak.modular.expect +++ b/pkg/front_end/testcases/rasta/issue_000081.dart.weak.modular.expect @@ -16,7 +16,7 @@ class Sub extends self::Base { get hashCode() → core::int return let final core::int? #t1 = this.{self::Sub::_hashCode}{core::int?} in #t1 == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : #t1{core::int}; method foo() → dynamic { - this.{self::Sub::_hashCode}{core::int?} == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; + this.{self::Sub::_hashCode}{core::int?} == null ?{core::int?} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; } } static method main() → dynamic { diff --git a/pkg/front_end/testcases/rasta/issue_000081.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/issue_000081.dart.weak.transformed.expect index e863deae59c..a9787107fef 100644 --- a/pkg/front_end/testcases/rasta/issue_000081.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/rasta/issue_000081.dart.weak.transformed.expect @@ -16,7 +16,7 @@ class Sub extends self::Base { get hashCode() → core::int return let final core::int? #t1 = this.{self::Sub::_hashCode}{core::int?} in #t1 == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : #t1{core::int}; method foo() → dynamic { - this.{self::Sub::_hashCode}{core::int?} == null ?{core::int} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; + this.{self::Sub::_hashCode}{core::int?} == null ?{core::int?} this.{self::Sub::_hashCode} = super.{self::Base::hashCode} : null; } } static method main() → dynamic { diff --git a/pkg/front_end/testcases/rasta/static.dart.strong.expect b/pkg/front_end/testcases/rasta/static.dart.strong.expect index 21d0f31abf8..ef693572b48 100644 --- a/pkg/front_end/testcases/rasta/static.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/static.dart.strong.expect @@ -322,7 +322,7 @@ Try correcting the name to the name of an existing method, or defining a method self::use(let final core::int #t11 = #C1 in #t11 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'. use(Foo.staticConstant ??= 87); ^^^^^^^^^^^^^^" : #t11); - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 87 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 87 : null; self::use(let final core::int #t12 = self::Foo::staticField in #t12 == null ?{core::int} self::Foo::staticField = 87 : #t12); #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'. Foo.staticFunction ??= 87; diff --git a/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect index 243566f89a5..e2cc4a7196e 100644 --- a/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect @@ -322,7 +322,7 @@ Try correcting the name to the name of an existing method, or defining a method self::use(let final core::int #t11 = #C1 in #t11 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'. use(Foo.staticConstant ??= 87); ^^^^^^^^^^^^^^" : #t11); - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 87 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 87 : null; self::use(let final core::int #t12 = self::Foo::staticField in #t12 == null ?{core::int} self::Foo::staticField = 87 : #t12); #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'. Foo.staticFunction ??= 87; diff --git a/pkg/front_end/testcases/rasta/static.dart.weak.expect b/pkg/front_end/testcases/rasta/static.dart.weak.expect index 21d0f31abf8..ef693572b48 100644 --- a/pkg/front_end/testcases/rasta/static.dart.weak.expect +++ b/pkg/front_end/testcases/rasta/static.dart.weak.expect @@ -322,7 +322,7 @@ Try correcting the name to the name of an existing method, or defining a method self::use(let final core::int #t11 = #C1 in #t11 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'. use(Foo.staticConstant ??= 87); ^^^^^^^^^^^^^^" : #t11); - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 87 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 87 : null; self::use(let final core::int #t12 = self::Foo::staticField in #t12 == null ?{core::int} self::Foo::staticField = 87 : #t12); #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'. Foo.staticFunction ??= 87; diff --git a/pkg/front_end/testcases/rasta/static.dart.weak.modular.expect b/pkg/front_end/testcases/rasta/static.dart.weak.modular.expect index 21d0f31abf8..ef693572b48 100644 --- a/pkg/front_end/testcases/rasta/static.dart.weak.modular.expect +++ b/pkg/front_end/testcases/rasta/static.dart.weak.modular.expect @@ -322,7 +322,7 @@ Try correcting the name to the name of an existing method, or defining a method self::use(let final core::int #t11 = #C1 in #t11 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'. use(Foo.staticConstant ??= 87); ^^^^^^^^^^^^^^" : #t11); - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 87 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 87 : null; self::use(let final core::int #t12 = self::Foo::staticField in #t12 == null ?{core::int} self::Foo::staticField = 87 : #t12); #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'. Foo.staticFunction ??= 87; diff --git a/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect index 243566f89a5..e2cc4a7196e 100644 --- a/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect @@ -322,7 +322,7 @@ Try correcting the name to the name of an existing method, or defining a method self::use(let final core::int #t11 = #C1 in #t11 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'. use(Foo.staticConstant ??= 87); ^^^^^^^^^^^^^^" : #t11); - self::Foo::staticField == null ?{core::int} self::Foo::staticField = 87 : null; + self::Foo::staticField == null ?{core::int?} self::Foo::staticField = 87 : null; self::use(let final core::int #t12 = self::Foo::staticField in #t12 == null ?{core::int} self::Foo::staticField = 87 : #t12); #C2 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'. Foo.staticFunction ??= 87; diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.expect b/pkg/front_end/testcases/rasta/super.dart.strong.expect index 6be1815dcb9..80776bbd795 100644 --- a/pkg/front_end/testcases/rasta/super.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/super.dart.strong.expect @@ -625,7 +625,7 @@ Try removing the extra positional arguments. self::use(let final () → void #t50 = super.{self::A::m} in #t50 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/super.dart:198:15: Error: Superclass has no setter named 'm'. use(super.m ??= 42); ^" : #t50); - super.{self::A::n} == null ?{core::Object} super.{self::A::n} = 42 : null; + super.{self::A::n} == null ?{core::Object?} super.{self::A::n} = 42 : null; self::use(let final () → void #t51 = super.{self::A::n} in #t51 == null ?{core::Object} super.{self::A::n} = 42 : #t51); super.{self::A::a} = super.{self::A::a}{dynamic}.+(42); self::use(super.{self::A::a} = super.{self::A::a}{dynamic}.+(42)); diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect index 1726fca752e..70bd54ef714 100644 --- a/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect @@ -625,7 +625,7 @@ Try removing the extra positional arguments. self::use(let final () → void #t50 = super.{self::A::m} in #t50 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/super.dart:198:15: Error: Superclass has no setter named 'm'. use(super.m ??= 42); ^" : #t50); - super.{self::A::n} == null ?{core::Object} super.{self::A::n} = 42 : null; + super.{self::A::n} == null ?{core::Object?} super.{self::A::n} = 42 : null; self::use(let final () → void #t51 = super.{self::A::n} in #t51 == null ?{core::Object} super.{self::A::n} = 42 : #t51); super.{self::A::a} = super.{self::A::a}{dynamic}.+(42); self::use(super.{self::A::a} = super.{self::A::a}{dynamic}.+(42)); diff --git a/pkg/front_end/testcases/rasta/super.dart.weak.expect b/pkg/front_end/testcases/rasta/super.dart.weak.expect index 6be1815dcb9..80776bbd795 100644 --- a/pkg/front_end/testcases/rasta/super.dart.weak.expect +++ b/pkg/front_end/testcases/rasta/super.dart.weak.expect @@ -625,7 +625,7 @@ Try removing the extra positional arguments. self::use(let final () → void #t50 = super.{self::A::m} in #t50 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/super.dart:198:15: Error: Superclass has no setter named 'm'. use(super.m ??= 42); ^" : #t50); - super.{self::A::n} == null ?{core::Object} super.{self::A::n} = 42 : null; + super.{self::A::n} == null ?{core::Object?} super.{self::A::n} = 42 : null; self::use(let final () → void #t51 = super.{self::A::n} in #t51 == null ?{core::Object} super.{self::A::n} = 42 : #t51); super.{self::A::a} = super.{self::A::a}{dynamic}.+(42); self::use(super.{self::A::a} = super.{self::A::a}{dynamic}.+(42)); diff --git a/pkg/front_end/testcases/rasta/super.dart.weak.modular.expect b/pkg/front_end/testcases/rasta/super.dart.weak.modular.expect index 6be1815dcb9..80776bbd795 100644 --- a/pkg/front_end/testcases/rasta/super.dart.weak.modular.expect +++ b/pkg/front_end/testcases/rasta/super.dart.weak.modular.expect @@ -625,7 +625,7 @@ Try removing the extra positional arguments. self::use(let final () → void #t50 = super.{self::A::m} in #t50 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/super.dart:198:15: Error: Superclass has no setter named 'm'. use(super.m ??= 42); ^" : #t50); - super.{self::A::n} == null ?{core::Object} super.{self::A::n} = 42 : null; + super.{self::A::n} == null ?{core::Object?} super.{self::A::n} = 42 : null; self::use(let final () → void #t51 = super.{self::A::n} in #t51 == null ?{core::Object} super.{self::A::n} = 42 : #t51); super.{self::A::a} = super.{self::A::a}{dynamic}.+(42); self::use(super.{self::A::a} = super.{self::A::a}{dynamic}.+(42)); diff --git a/pkg/front_end/testcases/rasta/super.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/super.dart.weak.transformed.expect index 1726fca752e..70bd54ef714 100644 --- a/pkg/front_end/testcases/rasta/super.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/rasta/super.dart.weak.transformed.expect @@ -625,7 +625,7 @@ Try removing the extra positional arguments. self::use(let final () → void #t50 = super.{self::A::m} in #t50 == null ?{invalid-type} invalid-expression "pkg/front_end/testcases/rasta/super.dart:198:15: Error: Superclass has no setter named 'm'. use(super.m ??= 42); ^" : #t50); - super.{self::A::n} == null ?{core::Object} super.{self::A::n} = 42 : null; + super.{self::A::n} == null ?{core::Object?} super.{self::A::n} = 42 : null; self::use(let final () → void #t51 = super.{self::A::n} in #t51 == null ?{core::Object} super.{self::A::n} = 42 : #t51); super.{self::A::a} = super.{self::A::a}{dynamic}.+(42); self::use(super.{self::A::a} = super.{self::A::a}{dynamic}.+(42));