From 4b21f58d39a67879682ec9c0c9665a6187432cc2 Mon Sep 17 00:00:00 2001 From: Johnni Winther Date: Wed, 20 Mar 2024 14:04:29 +0000 Subject: [PATCH] [cfe] Don't emit warnings on null-aware access on non-nullable Change-Id: I94f3011f69330f5b2d8998f29eb9511517e1fffa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357301 Reviewed-by: Chloe Stefantsova Reviewed-by: Erik Ernst Commit-Queue: Johnni Winther --- .../lib/src/messages/codes_generated.dart | 148 ------------- .../lib/src/type_inference/type_analyzer.dart | 2 +- pkg/dartdev/test/commands/compile_test.dart | 132 ------------ .../codes/fasta_codes_cfe_generated.dart | 42 ---- .../fasta/kernel/expression_generator.dart | 63 ------ .../fasta/type_inference/closure_context.dart | 32 +-- .../type_inference/inference_visitor.dart | 59 +---- .../inference_visitor_base.dart | 6 +- .../type_inference/shared_type_analyzer.dart | 12 +- pkg/front_end/messages.status | 1 - pkg/front_end/messages.yaml | 97 --------- .../constants/various2.dart.strong.expect | 8 - .../various2.dart.strong.transformed.expect | 8 - .../constants/various2.dart.weak.expect | 8 - .../various2.dart.weak.modular.expect | 8 - .../various2.dart.weak.outline.expect | 8 - .../various2.dart.weak.transformed.expect | 8 - .../various.dart.strong.expect | 4 - .../various.dart.strong.transformed.expect | 4 - .../various.dart.weak.expect | 4 - .../various.dart.weak.modular.expect | 4 - .../various.dart.weak.outline.expect | 4 - .../various.dart.weak.transformed.expect | 4 - .../general/issue47223a.dart.strong.expect | 7 - ...issue47223a.dart.strong.transformed.expect | 7 - .../general/issue47223a.dart.weak.expect | 7 - .../issue47223a.dart.weak.modular.expect | 7 - .../issue47223a.dart.weak.transformed.expect | 7 - .../general/issue47223b.dart.strong.expect | 7 - ...issue47223b.dart.strong.transformed.expect | 7 - .../general/issue47223b.dart.weak.expect | 7 - .../issue47223b.dart.weak.modular.expect | 7 - .../issue47223b.dart.weak.transformed.expect | 7 - .../general/issue49127.dart.strong.expect | 8 - .../issue49127.dart.strong.transformed.expect | 8 - .../general/issue49127.dart.weak.expect | 8 - .../issue49127.dart.weak.modular.expect | 8 - .../issue49127.dart.weak.transformed.expect | 8 - .../general/many_errors2.dart.strong.expect | 5 - ...any_errors2.dart.strong.transformed.expect | 5 - .../general/many_errors2.dart.weak.expect | 5 - .../many_errors2.dart.weak.modular.expect | 5 - .../many_errors2.dart.weak.transformed.expect | 5 - .../general/null_aware2.dart.strong.expect | 40 ---- ...null_aware2.dart.strong.transformed.expect | 40 ---- .../general/null_aware2.dart.weak.expect | 40 ---- .../null_aware2.dart.weak.modular.expect | 40 ---- .../null_aware2.dart.weak.transformed.expect | 40 ---- ..._bodied_lambdas_returns.dart.strong.expect | 12 +- ...das_returns.dart.strong.transformed.expect | 12 +- ...ck_bodied_lambdas_returns.dart.weak.expect | 15 +- ...d_lambdas_returns.dart.weak.modular.expect | 15 +- ...mbdas_returns.dart.weak.transformed.expect | 15 +- .../inference/future_then_ifNull2.dart | 1 - .../future_then_ifNull2.dart.strong.expect | 19 -- ...hen_ifNull2.dart.strong.transformed.expect | 19 -- .../future_then_ifNull2.dart.weak.expect | 19 -- ...ture_then_ifNull2.dart.weak.modular.expect | 19 -- ..._then_ifNull2.dart.weak.transformed.expect | 19 -- .../nnbd/issue41102.dart.strong.expect | 5 - .../issue41102.dart.strong.transformed.expect | 5 - .../nnbd/issue41102.dart.weak.expect | 5 - .../nnbd/issue41102.dart.weak.modular.expect | 5 - .../nnbd/issue41102.dart.weak.outline.expect | 5 - .../issue41102.dart.weak.transformed.expect | 5 - .../nnbd/issue42758.dart.strong.expect | 24 --- .../issue42758.dart.strong.transformed.expect | 24 --- .../nnbd/issue42758.dart.weak.expect | 24 --- .../nnbd/issue42758.dart.weak.modular.expect | 24 --- .../issue42758.dart.weak.transformed.expect | 24 --- .../nnbd/issue_39286_2.dart.strong.expect | 12 -- ...sue_39286_2.dart.strong.transformed.expect | 12 -- .../nnbd/issue_39286_2.dart.weak.expect | 12 -- .../issue_39286_2.dart.weak.modular.expect | 12 -- ...issue_39286_2.dart.weak.transformed.expect | 12 -- .../nnbd/never_receiver.dart.strong.expect | 20 -- ...er_receiver.dart.strong.transformed.expect | 20 -- .../nnbd/never_receiver.dart.weak.expect | 20 -- .../never_receiver.dart.weak.modular.expect | 20 -- ...ever_receiver.dart.weak.transformed.expect | 20 -- .../nnbd/null_access.dart.strong.expect | 14 -- ...null_access.dart.strong.transformed.expect | 14 -- .../nnbd/null_access.dart.weak.expect | 14 -- .../nnbd/null_access.dart.weak.modular.expect | 14 -- .../null_access.dart.weak.transformed.expect | 14 -- ...ull_aware_static_access.dart.strong.expect | 63 ------ ...atic_access.dart.strong.transformed.expect | 63 ------ .../null_aware_static_access.dart.weak.expect | 63 ------ ...are_static_access.dart.weak.modular.expect | 63 ------ ...static_access.dart.weak.transformed.expect | 63 ------ .../null_aware_this_access.dart.strong.expect | 113 ---------- ...this_access.dart.strong.transformed.expect | 113 ---------- .../null_aware_this_access.dart.weak.expect | 113 ---------- ...aware_this_access.dart.weak.modular.expect | 113 ---------- ...e_this_access.dart.weak.transformed.expect | 113 ---------- .../nnbd/null_check.dart.strong.expect | 86 -------- .../null_check.dart.strong.transformed.expect | 86 -------- .../nnbd/null_check.dart.weak.expect | 86 -------- .../nnbd/null_check.dart.weak.modular.expect | 86 -------- .../null_check.dart.weak.transformed.expect | 86 -------- .../null_shorting_index.dart.strong.expect | 55 ----- ...rting_index.dart.strong.transformed.expect | 55 ----- .../nnbd/null_shorting_index.dart.weak.expect | 55 ----- ...ll_shorting_index.dart.weak.modular.expect | 55 ----- ...horting_index.dart.weak.transformed.expect | 55 ----- .../pure_index_expressions.dart.strong.expect | 123 ----------- ...expressions.dart.strong.transformed.expect | 123 ----------- .../pure_index_expressions.dart.weak.expect | 123 ----------- ...index_expressions.dart.weak.modular.expect | 123 ----------- ...x_expressions.dart.weak.transformed.expect | 123 ----------- .../shorting_null_check.dart.strong.expect | 11 - ..._null_check.dart.strong.transformed.expect | 11 - .../nnbd/shorting_null_check.dart.weak.expect | 11 - ...orting_null_check.dart.weak.modular.expect | 11 - ...ng_null_check.dart.weak.transformed.expect | 11 - ...y_non_nullable_warnings.dart.strong.expect | 101 --------- ...le_warnings.dart.strong.transformed.expect | 101 --------- ...tly_non_nullable_warnings.dart.weak.expect | 101 --------- ...nullable_warnings.dart.weak.modular.expect | 101 --------- ...able_warnings.dart.weak.transformed.expect | 101 --------- .../unsound_checks.dart.weak.expect | 72 ------- .../unsound_checks.dart.weak.modular.expect | 72 ------- ...nsound_checks.dart.weak.transformed.expect | 72 ------- ..._pattern_inside_if_case.dart.strong.expect | 8 - ...ide_if_case.dart.strong.transformed.expect | 8 - ...st_pattern_inside_if_case.dart.weak.expect | 8 - ...rn_inside_if_case.dart.weak.modular.expect | 8 - ...nside_if_case.dart.weak.transformed.expect | 8 - ...ll_check_inside_if_case.dart.strong.expect | 18 -- ...ide_if_case.dart.strong.transformed.expect | 18 -- ...null_check_inside_if_case.dart.weak.expect | 18 -- ...ck_inside_if_case.dart.weak.modular.expect | 18 -- ...nside_if_case.dart.weak.transformed.expect | 18 -- ..._pattern_inside_if_case.dart.strong.expect | 8 - ...ide_if_case.dart.strong.transformed.expect | 8 - ...rd_pattern_inside_if_case.dart.weak.expect | 8 - ...rn_inside_if_case.dart.weak.modular.expect | 8 - ...nside_if_case.dart.weak.transformed.expect | 8 - .../patterns/shared_errors.dart.strong.expect | 10 - ...ared_errors.dart.strong.transformed.expect | 10 - .../patterns/shared_errors.dart.weak.expect | 10 - .../shared_errors.dart.weak.modular.expect | 10 - ...shared_errors.dart.weak.transformed.expect | 10 - .../testcases/rasta/static.dart.strong.expect | 24 --- .../static.dart.strong.transformed.expect | 24 --- .../testcases/rasta/static.dart.weak.expect | 24 --- .../rasta/static.dart.weak.modular.expect | 24 --- .../rasta/static.dart.weak.transformed.expect | 24 --- .../testcases/rasta/super.dart.strong.expect | 16 -- .../super.dart.strong.transformed.expect | 16 -- .../testcases/rasta/super.dart.weak.expect | 16 -- .../rasta/super.dart.weak.modular.expect | 16 -- .../rasta/super.dart.weak.transformed.expect | 16 -- .../rasta/type_literals.dart.strong.expect | 40 ---- ...pe_literals.dart.strong.transformed.expect | 40 ---- .../rasta/type_literals.dart.weak.expect | 40 ---- .../type_literals.dart.weak.modular.expect | 40 ---- ...type_literals.dart.weak.transformed.expect | 40 ---- .../rasta/typedef.dart.strong.expect | 5 - .../typedef.dart.strong.transformed.expect | 5 - .../testcases/rasta/typedef.dart.weak.expect | 5 - .../rasta/typedef.dart.weak.modular.expect | 5 - .../typedef.dart.weak.transformed.expect | 5 - .../nullable_access.dart.strong.expect | 8 - ...able_access.dart.strong.transformed.expect | 8 - .../records/nullable_access.dart.weak.expect | 8 - .../nullable_access.dart.weak.modular.expect | 8 - ...llable_access.dart.weak.transformed.expect | 8 - ...llable_access_extension.dart.strong.expect | 11 - ...s_extension.dart.strong.transformed.expect | 11 - ...nullable_access_extension.dart.weak.expect | 11 - ..._access_extension.dart.weak.modular.expect | 11 - ...ess_extension.dart.weak.transformed.expect | 11 - ...eric_return_null_aware2.dart.strong.expect | 8 - ...null_aware2.dart.strong.transformed.expect | 8 - ...eneric_return_null_aware2.dart.weak.expect | 8 - ...eturn_null_aware2.dart.weak.modular.expect | 8 - ...n_null_aware2.dart.weak.transformed.expect | 8 - ...tter_return_null_aware2.dart.strong.expect | 8 - ...null_aware2.dart.strong.transformed.expect | 8 - ...getter_return_null_aware2.dart.weak.expect | 8 - ...eturn_null_aware2.dart.weak.modular.expect | 8 - ...n_null_aware2.dart.weak.transformed.expect | 8 - pkg/front_end/testcases/strong.status | 1 + pkg/front_end/testcases/weak.status | 1 + .../test/frontend_server_test.dart | 13 +- ...licit_type_instantiation_parsing_test.dart | 40 ++-- .../assignment_behavior_runtime_26_test.dart | 2 - .../assignment_behavior_runtime_27_test.dart | 2 - .../if_null/assignment_behavior_test.dart | 11 - tests/language/if_null/precedence_test.dart | 4 - ...ion_unnecessary_null_aware_error_test.dart | 16 -- .../definite_assignment/read_error_test.dart | 204 ++++++++++++------ tests/language/nnbd/operator_type_test.dart | 7 - .../question_question_lub_test.dart | 4 - .../syntax/nullable_type_ambiguous_test.dart | 2 - .../null_aware/access_runtime_test.dart | 8 - tests/language/null_aware/access_test.dart | 20 +- .../null_aware/assignment_runtime_test.dart | 16 -- .../language/null_aware/assignment_test.dart | 39 ---- .../increment_decrement_runtime_test.dart | 30 --- .../null_aware/increment_decrement_test.dart | 46 ---- .../exhaustiveness/fallback_error_test.dart | 1 - ...tern_expression_precedence_error_test.dart | 6 - ...tch_trivial_exhaustiveness_error_test.dart | 7 +- .../spread_collections/null_spread_test.dart | 12 -- .../super/conditional_operator_test.dart | 41 ++-- .../conditional_operator_runtime_test.dart | 24 +-- .../this/conditional_operator_test.dart | 14 +- 209 files changed, 212 insertions(+), 5701 deletions(-) diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart index 359cb5e1fdb..f7eb4a94759 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart @@ -1392,36 +1392,6 @@ const MessageCode messageClassInClass = const MessageCode( correctionMessage: r"""Try moving the class to the top-level.""", ); -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template templateClassInNullAwareReceiver = - const Template( - "ClassInNullAwareReceiver", - problemMessageTemplate: r"""The class '#name' cannot be null.""", - correctionMessageTemplate: r"""Try replacing '?.' with '.'""", - withArguments: _withArgumentsClassInNullAwareReceiver, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeClassInNullAwareReceiver = - const Code( - "ClassInNullAwareReceiver", - severity: Severity.warning, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsClassInNullAwareReceiver(String name) { - if (name.isEmpty) throw 'No name provided'; - name = demangleMixinApplicationName(name); - return new Message( - codeClassInNullAwareReceiver, - problemMessage: """The class '${name}' cannot be null.""", - correctionMessage: """Try replacing '?.' with '.'""", - arguments: { - 'name': name, - }, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeColonInPlaceOfIn = messageColonInPlaceOfIn; @@ -5227,37 +5197,6 @@ const MessageCode messageExtensionDeclaresInstanceField = const MessageCode( r"""Try removing the field declaration or making it a static field""", ); -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template - templateExtensionInNullAwareReceiver = - const Template( - "ExtensionInNullAwareReceiver", - problemMessageTemplate: r"""The extension '#name' cannot be null.""", - correctionMessageTemplate: r"""Try replacing '?.' with '.'""", - withArguments: _withArgumentsExtensionInNullAwareReceiver, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeExtensionInNullAwareReceiver = - const Code( - "ExtensionInNullAwareReceiver", - severity: Severity.warning, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsExtensionInNullAwareReceiver(String name) { - if (name.isEmpty) throw 'No name provided'; - name = demangleMixinApplicationName(name); - return new Message( - codeExtensionInNullAwareReceiver, - problemMessage: """The extension '${name}' cannot be null.""", - correctionMessage: """Try replacing '?.' with '.'""", - arguments: { - 'name': name, - }, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateExtensionMemberConflictsWithObjectMember = @@ -12703,18 +12642,6 @@ const MessageCode messageNeverReachableSwitchDefaultError = const MessageCode( r"""`null` encountered as case in a switch expression with a non-nullable enum type.""", ); -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeNeverReachableSwitchDefaultWarning = - messageNeverReachableSwitchDefaultWarning; - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageNeverReachableSwitchDefaultWarning = const MessageCode( - "NeverReachableSwitchDefaultWarning", - severity: Severity.warning, - problemMessage: - r"""The default case is not reachable with sound null safety because the switch expression is non-nullable.""", -); - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeNeverReachableSwitchExpressionError = messageNeverReachableSwitchExpressionError; @@ -12748,17 +12675,6 @@ const MessageCode messageNeverValueError = const MessageCode( r"""`null` encountered as the result from expression with type `Never`.""", ); -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeNeverValueWarning = messageNeverValueWarning; - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageNeverValueWarning = const MessageCode( - "NeverValueWarning", - severity: Severity.warning, - problemMessage: - r"""The expression can not result in a value with sound null safety because the expression type is `Never`.""", -); - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeNewAsSelector = messageNewAsSelector; @@ -15327,18 +15243,6 @@ const MessageCode messageReturnTypeFunctionExpression = const MessageCode( problemMessage: r"""A function expression can't have a return type.""", ); -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeReturnWithoutExpression = messageReturnWithoutExpression; - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageReturnWithoutExpression = const MessageCode( - "ReturnWithoutExpression", - analyzerCodes: ["RETURN_WITHOUT_VALUE"], - severity: Severity.warning, - problemMessage: - r"""Must explicitly return a value from a non-void function.""", -); - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeReturnWithoutExpressionAsync = messageReturnWithoutExpressionAsync; @@ -16412,17 +16316,6 @@ const MessageCode messageThisAsIdentifier = const MessageCode( problemMessage: r"""Expected identifier, but got 'this'.""", ); -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeThisInNullAwareReceiver = messageThisInNullAwareReceiver; - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageThisInNullAwareReceiver = const MessageCode( - "ThisInNullAwareReceiver", - severity: Severity.warning, - problemMessage: r"""The receiver 'this' cannot be null.""", - correctionMessage: r"""Try replacing '?.' with '.'""", -); - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateThisNotPromoted = const Template( @@ -17405,47 +17298,6 @@ const MessageCode messageUnnamedObjectPatternField = const MessageCode( r"""Try adding a pattern name or ':' before the pattern.""", ); -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeUnnecessaryNullAssertPattern = - messageUnnecessaryNullAssertPattern; - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageUnnecessaryNullAssertPattern = const MessageCode( - "UnnecessaryNullAssertPattern", - analyzerCodes: ["UNNECESSARY_NULL_ASSERT_PATTERN"], - severity: Severity.warning, - problemMessage: - r"""The null-assert pattern will have no effect because the matched type isn't nullable.""", - correctionMessage: - r"""Try replacing the null-assert pattern with its nested pattern.""", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeUnnecessaryNullCheckPattern = - messageUnnecessaryNullCheckPattern; - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageUnnecessaryNullCheckPattern = const MessageCode( - "UnnecessaryNullCheckPattern", - analyzerCodes: ["UNNECESSARY_NULL_CHECK_PATTERN"], - severity: Severity.warning, - problemMessage: - r"""The null-check pattern will have no effect because the matched type isn't nullable.""", - correctionMessage: - r"""Try replacing the null-check pattern with its nested pattern.""", -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeUnreachableSwitchCase = messageUnreachableSwitchCase; - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const MessageCode messageUnreachableSwitchCase = const MessageCode( - "UnreachableSwitchCase", - analyzerCodes: ["UNREACHABLE_SWITCH_CASE"], - severity: Severity.warning, - problemMessage: r"""This case is covered by the previous cases.""", -); - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateUnresolvedPrefixInTypeAnnotation = diff --git a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart index fd480d67eac..0e81dbff8d2 100644 --- a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart +++ b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart @@ -2551,7 +2551,7 @@ abstract class TypeAnalyzerErrors< /// Called when a null-assert or null-check pattern is used with the matched /// type that is strictly non-nullable, so the null check is not necessary. - Error matchedTypeIsStrictlyNonNullable({ + Error? matchedTypeIsStrictlyNonNullable({ required Pattern pattern, required Type matchedType, }); diff --git a/pkg/dartdev/test/commands/compile_test.dart b/pkg/dartdev/test/commands/compile_test.dart index 1f6a4e28c5d..c5d9f519358 100644 --- a/pkg/dartdev/test/commands/compile_test.dart +++ b/pkg/dartdev/test/commands/compile_test.dart @@ -631,33 +631,6 @@ void main() { reason: 'File not found: $outFile'); }, skip: isRunningOnIA32); - test('Compile exe with warnings', () async { - final p = project(mainSrc: ''' -void main() { - int i = 0; - i?.isEven; -} -'''); - final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath)); - final outFile = path.canonicalize(path.join(p.dirPath, 'myexe')); - - final result = await p.run( - [ - 'compile', - 'exe', - '-o', - outFile, - inFile, - ], - ); - - expect(result.stdout, contains('Warning: ')); - expect(result.stderr, isEmpty); - expect(result.exitCode, 0); - expect(File(outFile).existsSync(), true, - reason: 'File not found: $outFile'); - }, skip: isRunningOnIA32); - test('Compile exe with sound null safety', () async { final p = project(mainSrc: '''void main() {}'''); final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath)); @@ -892,32 +865,6 @@ void main() { reason: 'File not found: $outFile'); }, skip: isRunningOnIA32); - test('Compile wasm with warnings', () async { - final p = project(mainSrc: ''' -void main() { - int i = 0; - i?.isEven; -} -'''); - final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath)); - final outFile = path.canonicalize(path.join(p.dirPath, 'mywasm.wasm')); - - final result = await p.run( - [ - 'compile', - 'wasm', - '-o', - outFile, - inFile, - ], - ); - - expect(result.stderr, contains('Warning: ')); - expect(result.exitCode, 0); - expect(File(outFile).existsSync(), true, - reason: 'File not found: $outFile'); - }, skip: isRunningOnIA32); - test('Compile JS with sound null safety', () async { final p = project(mainSrc: '''void main() {}'''); final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath)); @@ -1090,35 +1037,6 @@ void main() { expect(result.exitCode, 0); }, skip: isRunningOnIA32); - test('Compile AOT snapshot with warnings', () async { - final p = project(mainSrc: ''' -void main() { - int i = 0; - i?.isEven; -} -'''); - final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath)); - final outFile = path.canonicalize(path.join(p.dirPath, 'myaot')); - - final result = await p.run( - [ - 'compile', - 'aot-snapshot', - '--verbosity=warning', - '-o', - outFile, - inFile, - ], - ); - - // Only printed when -v/--verbose is used, not --verbosity. - expect(result.stdout, isNot(contains(usingTargetOSMessage))); - expect(result.stdout, isNot(contains(soundNullSafetyMessage))); - expect(result.stdout, contains('Warning: ')); - expect(result.stderr, isEmpty); - expect(result.exitCode, 0); - }, skip: isRunningOnIA32); - test('Compile AOT snapshot from kernel', () async { final p = project(mainSrc: ''' void main() {} @@ -1358,31 +1276,6 @@ void main() { expect(result.exitCode, 64); }); - test('Compile kernel with warnings', () async { - final p = project(mainSrc: ''' -void main() { - int i = 0; - i?.isEven; -}'''); - final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath)); - final outFile = path.canonicalize(path.join(p.dirPath, 'mydill')); - - final result = await p.run( - [ - 'compile', - 'kernel', - '--verbosity=warning', - '-o', - outFile, - inFile, - ], - ); - - expect(result.stderr, isNot(contains(soundNullSafetyMessage))); - expect(result.stdout, contains('Warning:')); - expect(result.exitCode, 0); - }); - test('Compile JIT snapshot with default (sound null safety)', () async { final p = project(mainSrc: '''void main() {}'''); final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath)); @@ -1503,31 +1396,6 @@ void main() { expect(result.exitCode, 254); }); - test('Compile JIT snapshot with warnings', () async { - final p = project(mainSrc: ''' -void main() { - int i = 0; - i?.isEven; -}'''); - final inFile = path.canonicalize(path.join(p.dirPath, p.relativeFilePath)); - final outFile = path.canonicalize(path.join(p.dirPath, 'myjit')); - - final result = await p.run( - [ - 'compile', - 'jit-snapshot', - '--verbosity=warning', - '-o', - outFile, - inFile, - ], - ); - - expect(result.stderr, isNot(contains(soundNullSafetyMessage))); - expect(result.stderr, contains('Warning:')); - expect(result.exitCode, 0); - }); - if (Platform.isMacOS) { test('Compile and run executable from signed dartaotruntime', () async { // Either the locally built dartaotruntime is already linker signed diff --git a/pkg/front_end/lib/src/fasta/codes/fasta_codes_cfe_generated.dart b/pkg/front_end/lib/src/fasta/codes/fasta_codes_cfe_generated.dart index 3d5881756c3..2bf149969c7 100644 --- a/pkg/front_end/lib/src/fasta/codes/fasta_codes_cfe_generated.dart +++ b/pkg/front_end/lib/src/fasta/codes/fasta_codes_cfe_generated.dart @@ -5181,48 +5181,6 @@ Message _withArgumentsNonNullAwareSpreadIsNull( ); } -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template< - Message Function( - String name, DartType _type, bool isNonNullableByDefault)> - templateNonNullableInNullAware = const Template< - Message Function( - String name, DartType _type, bool isNonNullableByDefault)>( - "NonNullableInNullAware", - problemMessageTemplate: - r"""Operand of null-aware operation '#name' has type '#type' which excludes null.""", - withArguments: _withArgumentsNonNullableInNullAware, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code< - Message Function(String name, DartType _type, - bool isNonNullableByDefault)> codeNonNullableInNullAware = const Code< - Message Function(String name, DartType _type, bool isNonNullableByDefault)>( - "NonNullableInNullAware", - severity: Severity.warning, -); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsNonNullableInNullAware( - String name, DartType _type, bool isNonNullableByDefault) { - if (name.isEmpty) throw 'No name provided'; - name = demangleMixinApplicationName(name); - TypeLabeler labeler = new TypeLabeler(isNonNullableByDefault); - List typeParts = labeler.labelType(_type); - String type = typeParts.join(); - return new Message( - codeNonNullableInNullAware, - problemMessage: - """Operand of null-aware operation '${name}' has type '${type}' which excludes null.""" + - labeler.originMessages, - arguments: { - 'name': name, - 'type': _type, - }, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateNullableExpressionCallError = const Template< diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart index e537656308c..7fd0aacf25a 100644 --- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart +++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart @@ -629,16 +629,6 @@ class ThisPropertyAccessGenerator extends Generator { @override String get _plainNameForRead => name.text; - void _reportNonNullableInNullAwareWarningIfNeeded() { - if (isNullAware && _helper.libraryBuilder.isNonNullableByDefault) { - _helper.libraryBuilder.addProblem( - messageThisInNullAwareReceiver, - thisOffset ?? fileOffset, - thisOffset != null ? 4 : noLength, - _helper.uri); - } - } - Expression get _thisExpression => thisVariable != null ? _forest.createVariableGet(fileOffset, thisVariable!) : _forest.createThisExpression(fileOffset); @@ -649,13 +639,11 @@ class ThisPropertyAccessGenerator extends Generator { } Expression _createRead() { - _reportNonNullableInNullAwareWarningIfNeeded(); return _forest.createPropertyGet(fileOffset, _thisExpression, name); } @override Expression buildAssignment(Expression value, {bool voidContext = false}) { - _reportNonNullableInNullAwareWarningIfNeeded(); return _createWrite(fileOffset, value, forEffect: voidContext); } @@ -681,7 +669,6 @@ class ThisPropertyAccessGenerator extends Generator { bool voidContext = false, bool isPreIncDec = false, bool isPostIncDec = false}) { - _reportNonNullableInNullAwareWarningIfNeeded(); Expression binary = _helper.forest .createBinary(offset, _createRead(), binaryOperator, value); return _createWrite(fileOffset, binary, forEffect: voidContext); @@ -695,7 +682,6 @@ class ThisPropertyAccessGenerator extends Generator { return buildCompoundAssignment(binaryOperator, value, offset: offset, voidContext: voidContext, isPostIncDec: true); } - _reportNonNullableInNullAwareWarningIfNeeded(); VariableDeclarationImpl read = _helper.createVariableDeclarationForValue(_createRead()); Expression binary = _helper.forest.createBinary(offset, @@ -1137,26 +1123,14 @@ class ThisIndexedAccessGenerator extends Generator { @override String get _debugName => "ThisIndexedAccessGenerator"; - void _reportNonNullableInNullAwareWarningIfNeeded() { - if (isNullAware && _helper.libraryBuilder.isNonNullableByDefault) { - _helper.libraryBuilder.addProblem( - messageThisInNullAwareReceiver, - thisOffset ?? fileOffset, - thisOffset != null ? 4 : noLength, - _helper.uri); - } - } - @override Expression buildSimpleRead() { - _reportNonNullableInNullAwareWarningIfNeeded(); Expression receiver = _helper.forest.createThisExpression(fileOffset); return _forest.createIndexGet(fileOffset, receiver, index); } @override Expression buildAssignment(Expression value, {bool voidContext = false}) { - _reportNonNullableInNullAwareWarningIfNeeded(); Expression receiver = _helper.forest.createThisExpression(fileOffset); return _forest.createIndexSet(fileOffset, receiver, index, value, forEffect: voidContext); @@ -1165,7 +1139,6 @@ class ThisIndexedAccessGenerator extends Generator { @override Expression buildIfNullAssignment(Expression value, DartType type, int offset, {bool voidContext = false}) { - _reportNonNullableInNullAwareWarningIfNeeded(); Expression receiver = _helper.forest.createThisExpression(fileOffset); return new IfNullIndexSet(receiver, index, value, readOffset: fileOffset, @@ -1181,7 +1154,6 @@ class ThisIndexedAccessGenerator extends Generator { bool voidContext = false, bool isPreIncDec = false, bool isPostIncDec = false}) { - _reportNonNullableInNullAwareWarningIfNeeded(); Expression receiver = _helper.forest.createThisExpression(fileOffset); return new CompoundIndexSet(receiver, index, binaryOperator, value, readOffset: fileOffset, @@ -1444,28 +1416,6 @@ class StaticAccessGenerator extends Generator { isNullAware: isNullAware); } - void _reportNonNullableInNullAwareWarningIfNeeded() { - if (isNullAware && _helper.libraryBuilder.isNonNullableByDefault) { - DeclarationBuilder declarationBuilder = - parentBuilder as DeclarationBuilder; - if (declarationBuilder.isExtension) { - String extensionName = declarationBuilder.name; - _helper.libraryBuilder.addProblem( - templateExtensionInNullAwareReceiver.withArguments(extensionName), - typeOffset ?? fileOffset, - typeOffset != null ? extensionName.length : noLength, - _helper.uri); - } else { - String className = declarationBuilder.name; - _helper.libraryBuilder.addProblem( - templateClassInNullAwareReceiver.withArguments(className), - typeOffset ?? fileOffset, - typeOffset != null ? className.length : noLength, - _helper.uri); - } - } - } - @override String get _debugName => "StaticAccessGenerator"; @@ -1483,7 +1433,6 @@ class StaticAccessGenerator extends Generator { if (readTarget == null) { read = _makeInvalidRead(UnresolvedKind.Getter); } else { - _reportNonNullableInNullAwareWarningIfNeeded(); if (readTarget is Procedure && readTarget.kind == ProcedureKind.Method) { read = _helper.forest.createStaticTearOff(fileOffset, readTarget); } else { @@ -1495,7 +1444,6 @@ class StaticAccessGenerator extends Generator { @override Expression buildAssignment(Expression value, {bool voidContext = false}) { - _reportNonNullableInNullAwareWarningIfNeeded(); return _createWrite(fileOffset, value); } @@ -1504,7 +1452,6 @@ class StaticAccessGenerator extends Generator { if (writeTarget == null) { write = _makeInvalidWrite(value); } else { - _reportNonNullableInNullAwareWarningIfNeeded(); write = new StaticSet(writeTarget!, value)..fileOffset = offset; } return write; @@ -4475,13 +4422,6 @@ class ThisAccessGenerator extends Generator { ]; } - void _reportNonNullableInNullAwareWarningIfNeeded() { - if (_helper.libraryBuilder.isNonNullableByDefault) { - _helper.libraryBuilder.addProblem( - messageThisInNullAwareReceiver, fileOffset, 4, _helper.uri); - } - } - @override Expression_Generator_Initializer buildSelectorAccess( Selector selector, int operatorOffset, bool isNullAware) { @@ -4502,9 +4442,6 @@ class ThisAccessGenerator extends Generator { if (selector is InvocationSelector) { // Notice that 'this' or 'super' can't be null. So we can ignore the // value of [isNullAware]. - if (isNullAware) { - _reportNonNullableInNullAwareWarningIfNeeded(); - } if (isSuper) { return _helper.buildSuperInvocation( name, selector.arguments, offsetForToken(selector.token)); diff --git a/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart b/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart index 1b7b9a0d99c..140beb781e8 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart @@ -242,21 +242,7 @@ class _SyncClosureContext implements ClosureContext { } else { // The rules for valid returns for functions with [returnType] `T` and // a return expression with static [expressionType] `S`. - if (statement.expression == null) { - // `return;` is a valid return if T is void, dynamic, or Null. - if (returnType is VoidType || - returnType is DynamicType || - returnType is NullType) { - // Valid return; - } else { - statement.expression = inferrer.helper.wrapInProblem( - new NullLiteral()..fileOffset = statement.fileOffset, - messageReturnWithoutExpression, - statement.fileOffset, - noLength) - ..parent = statement; - } - } else { + if (statement.expression != null) { void ensureAssignability() { Expression expression = inferrer.ensureAssignable( _returnContext, expressionType, statement.expression!, @@ -616,21 +602,7 @@ class _AsyncClosureContext implements ClosureContext { // and a return expression with static [expressionType] `S`. DartType flattenedReturnType = inferrer.typeSchemaEnvironment.flatten(returnType); - if (statement.expression == null) { - // `return;` is a valid return if flatten(T) is void, dynamic, or Null. - if (flattenedReturnType is VoidType || - flattenedReturnType is DynamicType || - flattenedReturnType is NullType) { - // Valid return; - } else { - statement.expression = inferrer.helper.wrapInProblem( - new NullLiteral()..fileOffset = statement.fileOffset, - messageReturnWithoutExpression, - statement.fileOffset, - noLength) - ..parent = statement; - } - } else { + if (statement.expression != null) { DartType flattenedExpressionType = inferrer.typeSchemaEnvironment.flatten(expressionType); 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 a1abfa543de..2d0d97b2299 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 @@ -288,8 +288,8 @@ class InferenceVisitorImpl extends InferenceVisitorBase result.nullAwareAction is InvalidExpression)) { Expression replacement = createLet( createVariable(result.expression, result.inferredType), - createReachabilityError(expression.fileOffset, - messageNeverValueError, messageNeverValueWarning)); + createReachabilityError( + expression.fileOffset, messageNeverValueError)); flowAnalysis.forwardExpression(replacement, result.expression); result = new ExpressionInferenceResult(result.inferredType, replacement); @@ -931,10 +931,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase ExpressionInferenceResult result = inferExpression( node.variable.initializer!, typeContext, isVoidAllowed: false); - if (node.isNullAware) { - reportNonNullableInNullAwareWarningIfNeeded( - result.inferredType, "?..", node.fileOffset); - } node.variable.initializer = result.expression..parent = node.variable; node.variable.type = result.inferredType; @@ -1916,8 +1912,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase node.left, computeNullable(typeContext), isVoidAllowed: false); DartType t1 = lhsResult.inferredType; - reportNonNullableInNullAwareWarningIfNeeded( - t1, "??", lhsResult.expression.fileOffset); // This ends any shorting in `node.left`. Expression left = lhsResult.expression; @@ -2211,10 +2205,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase libraryBuilder.nullableIfTrue(element.isNullAware), [inferredTypeArgument]), isVoidAllowed: true); - if (element.isNullAware) { - reportNonNullableInNullAwareWarningIfNeeded( - spreadResult.inferredType, "...?", element.expression.fileOffset); - } element.expression = spreadResult.expression..parent = element; DartType spreadType = spreadResult.inferredType; inferredSpreadTypes[element.expression] = spreadType; @@ -3941,10 +3931,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase } ExpressionInferenceResult spreadResult = inferExpression(entry.expression, spreadContext, isVoidAllowed: true); - if (entry.isNullAware) { - reportNonNullableInNullAwareWarningIfNeeded( - spreadResult.inferredType, "...?", entry.expression.fileOffset); - } entry.expression = spreadResult.expression..parent = entry; DartType spreadType = spreadResult.inferredType; inferredSpreadTypes[entry.expression] = spreadType; @@ -5004,8 +4990,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase DartType operandType = operandResult.nullAwareActionType; node.operand = operand..parent = node; - reportNonNullableInNullAwareWarningIfNeeded( - operandType, "!", node.operand.fileOffset); flowAnalysis.nonNullAssert_end(node.operand); DartType nonNullableResultType = operations.promoteToNonNull(operandType); return createNullAwareExpressionInferenceResult( @@ -5016,8 +5000,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase NullAwareMethodInvocation node, DartType typeContext) { Link nullAwareGuards = inferSyntheticVariableNullAware(node.variable); - reportNonNullableInNullAwareWarningIfNeeded( - node.variable.type, "?.", node.variable.fileOffset); NullAwareGuard nullAwareGuard = createNullAwareGuard(node.variable); ExpressionInferenceResult invocationResult = inferExpression(node.invocation, typeContext, isVoidAllowed: true); @@ -5031,8 +5013,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase NullAwarePropertyGet node, DartType typeContext) { Link nullAwareGuards = inferSyntheticVariableNullAware(node.variable); - reportNonNullableInNullAwareWarningIfNeeded( - node.variable.type, "?.", node.variable.fileOffset); NullAwareGuard nullAwareGuard = createNullAwareGuard(node.variable); ExpressionInferenceResult readResult = inferExpression(node.read, typeContext); @@ -5044,8 +5024,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase NullAwarePropertySet node, DartType typeContext) { Link nullAwareGuards = inferSyntheticVariableNullAware(node.variable); - reportNonNullableInNullAwareWarningIfNeeded( - node.variable.type, "?.", node.variable.fileOffset); NullAwareGuard nullAwareGuard = createNullAwareGuard(node.variable); ExpressionInferenceResult writeResult = inferExpression(node.write, typeContext, isVoidAllowed: true); @@ -5056,8 +5034,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase ExpressionInferenceResult visitNullAwareExtension( NullAwareExtension node, DartType typeContext) { inferSyntheticVariable(node.variable); - reportNonNullableInNullAwareWarningIfNeeded( - node.variable.type, "?.", node.variable.fileOffset); NullAwareGuard nullAwareGuard = createNullAwareGuard(node.variable); ExpressionInferenceResult expressionResult = inferExpression(node.expression, typeContext); @@ -5209,8 +5185,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase isThisReceiver: node.receiver is ThisExpression) .expressionInferenceResult; - reportNonNullableInNullAwareWarningIfNeeded( - readResult.inferredType, "??=", node.readOffset); Expression read = readResult.expression; DartType readType = readResult.inferredType; @@ -5324,8 +5298,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase IfNullSet node, DartType typeContext) { ExpressionInferenceResult readResult = inferNullAwareExpression(node.read, const UnknownType()); - reportNonNullableInNullAwareWarningIfNeeded( - readResult.inferredType, "??=", node.read.fileOffset); Link nullAwareGuards = readResult.nullAwareGuards; Expression read = readResult.nullAwareAction; @@ -5695,8 +5667,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase readIndex, readIndexType, checkKind); - reportNonNullableInNullAwareWarningIfNeeded( - readResult.inferredType, "??=", node.readOffset); Expression read = readResult.expression; DartType readType = readResult.inferredType; flowAnalysis.ifNullExpression_rightBegin(read, readType); @@ -5828,8 +5798,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase : const ObjectAccessTarget.missing(); DartType readType = readTarget.getReturnType(this); - reportNonNullableInNullAwareWarningIfNeeded( - readType, "??=", node.readOffset); DartType readIndexType = readTarget.getIndexKeyType(this); ObjectAccessTarget writeTarget = node.setter != null @@ -6026,8 +5994,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase readIndex, readIndexType, MethodContravarianceCheckKind.none); - reportNonNullableInNullAwareWarningIfNeeded( - readResult.inferredType, "??=", node.readOffset); Expression read = readResult.expression; DartType readType = readResult.inferredType; flowAnalysis.ifNullExpression_rightBegin(read, readType); @@ -7124,8 +7090,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase ExpressionInferenceResult receiverResult = inferNullAwareExpression( node.receiver, const UnknownType(), isVoidAllowed: true); - reportNonNullableInNullAwareWarningIfNeeded( - receiverResult.inferredType, "?.", node.receiver.fileOffset); Link nullAwareGuards = receiverResult.nullAwareGuards; Expression receiver = receiverResult.nullAwareAction; @@ -7686,8 +7650,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase ExpressionInferenceResult receiverResult = inferNullAwareExpression( node.receiver, const UnknownType(), isVoidAllowed: false); - reportNonNullableInNullAwareWarningIfNeeded( - receiverResult.inferredType, "?.", node.receiver.fileOffset); Link nullAwareGuards = receiverResult.nullAwareGuards; Expression receiver = receiverResult.nullAwareAction; @@ -8466,9 +8428,7 @@ class InferenceVisitorImpl extends InferenceVisitorBase [], [], _createExpressionStatement(createReachabilityError( - node.fileOffset, - messageNeverReachableSwitchDefaultError, - messageNeverReachableSwitchDefaultWarning)), + node.fileOffset, messageNeverReachableSwitchDefaultError)), isDefault: true) ..fileOffset = node.fileOffset ..parent = node); @@ -9470,19 +9430,6 @@ class InferenceVisitorImpl extends InferenceVisitorBase return new ExpressionInferenceResult(type, result); } - void reportNonNullableInNullAwareWarningIfNeeded( - DartType operandType, String operationName, int offset) { - if (operandType is! InvalidType && - operandType.nullability == Nullability.nonNullable) { - libraryBuilder.addProblem( - templateNonNullableInNullAware.withArguments( - operationName, operandType, isNonNullableByDefault), - offset, - noLength, - helper.uri); - } - } - /// Pops the top entry off of [_rewriteStack]. Object? popRewrite([NullValue? nullValue]) { Object entry = _rewriteStack.removeLast(); diff --git a/pkg/front_end/lib/src/fasta/type_inference/inference_visitor_base.dart b/pkg/front_end/lib/src/fasta/type_inference/inference_visitor_base.dart index 6e27414282e..4b331e3d968 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/inference_visitor_base.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/inference_visitor_base.dart @@ -214,11 +214,7 @@ abstract class InferenceVisitorBase implements InferenceVisitor { } } - Expression createReachabilityError( - int fileOffset, Message errorMessage, Message warningMessage) { - if (libraryBuilder.loader.target.context.options.warnOnReachabilityCheck) { - helper.addProblem(warningMessage, fileOffset, noLength); - } + Expression createReachabilityError(int fileOffset, Message errorMessage) { Arguments arguments = new Arguments([ new StringLiteral(errorMessage.problemMessage)..fileOffset = fileOffset ]) diff --git a/pkg/front_end/lib/src/fasta/type_inference/shared_type_analyzer.dart b/pkg/front_end/lib/src/fasta/type_inference/shared_type_analyzer.dart index f3bbdc1a853..e89853676f0 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/shared_type_analyzer.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/shared_type_analyzer.dart @@ -127,18 +127,12 @@ class SharedTypeAnalyzerErrors } @override - InvalidExpression matchedTypeIsStrictlyNonNullable({ + InvalidExpression? matchedTypeIsStrictlyNonNullable({ required Pattern pattern, required DartType matchedType, }) { - // These are only warnings, so we don't update `pattern.error`. - if (pattern is NullAssertPattern) { - return helper.buildProblem( - messageUnnecessaryNullAssertPattern, pattern.fileOffset, noLength); - } else { - return helper.buildProblem( - messageUnnecessaryNullCheckPattern, pattern.fileOffset, noLength); - } + // These are only warnings, so we don't report anything. + return null; } @override diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status index 02f4a92b511..4cb0eccf3ba 100644 --- a/pkg/front_end/messages.status +++ b/pkg/front_end/messages.status @@ -72,7 +72,6 @@ CantUsePrefixWithNullAware/part_wrapped_script: Fail # Importing file in the (no CantUseSuperBoundedTypeForInstanceCreation/analyzerCode: Fail CantUseSuperBoundedTypeForInstanceCreation/example: Fail ClassImplementsDeferredClass/part_wrapped_script: Fail # Uses imports -ClassInNullAwareReceiver/analyzerCode: Fail ColonInPlaceOfIn/example: Fail CompilingWithSoundNullSafety/analyzerCode: Fail CompilingWithoutSoundNullSafety/analyzerCode: Fail diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index d1ef5586d71..7b1fa499589 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -4701,14 +4701,6 @@ ReturnFromVoidFunction: analyzerCode: RETURN_OF_INVALID_TYPE declaration: "void foo() { return 1; }" -ReturnWithoutExpression: - problemMessage: "Must explicitly return a value from a non-void function." - severity: WARNING - analyzerCode: RETURN_WITHOUT_VALUE - script: | - // @dart=2.9 - int foo() { return; } - ReturnWithoutExpressionSync: problemMessage: "A value must be explicitly returned from a non-void function." configuration: nnbd-strong @@ -6003,49 +5995,6 @@ JsInteropStaticInteropWithNonStaticSupertype: problemMessage: "JS interop class '#name' has an `@staticInterop` annotation, but has supertype '#name2', which does not." correctionMessage: "Try marking the supertype as a static interop class using `@staticInterop`." -NonNullableInNullAware: - problemMessage: "Operand of null-aware operation '#name' has type '#type' which excludes null." - severity: WARNING - -ThisInNullAwareReceiver: - problemMessage: "The receiver 'this' cannot be null." - correctionMessage: "Try replacing '?.' with '.'" - severity: WARNING - configuration: nnbd-strong - script: | - class C { - var field; - method() { - this?.field; - } - } - -ClassInNullAwareReceiver: - problemMessage: "The class '#name' cannot be null." - correctionMessage: "Try replacing '?.' with '.'" - severity: WARNING - configuration: nnbd-strong - script: | - class C { - static var field; - } - method() { - C?.field; - } - -ExtensionInNullAwareReceiver: - problemMessage: "The extension '#name' cannot be null." - correctionMessage: "Try replacing '?.' with '.'" - severity: WARNING - configuration: nnbd-strong - script: | - extension E on int { - static var field; - } - method() { - E?.field; - } - NonNullableNotAssignedError: problemMessage: "Non-nullable variable '#name' must be assigned before it can be used." configuration: nnbd-strong @@ -6160,10 +6109,6 @@ NonVoidReturnSetter: NeverReachableSwitchDefaultError: problemMessage: "`null` encountered as case in a switch expression with a non-nullable enum type." -NeverReachableSwitchDefaultWarning: - problemMessage: "The default case is not reachable with sound null safety because the switch expression is non-nullable." - severity: WARNING - NeverReachableSwitchExpressionError: problemMessage: "`null` encountered as case in a switch expression with a non-nullable type." @@ -6179,10 +6124,6 @@ UnsoundSwitchStatementError: NeverValueError: problemMessage: "`null` encountered as the result from expression with type `Never`." -NeverValueWarning: - problemMessage: "The expression can not result in a value with sound null safety because the expression type is `Never`." - severity: WARNING - MainNotFunctionDeclaration: problemMessage: "The 'main' declaration must be a function declaration." configuration: nnbd-strong @@ -6910,23 +6851,6 @@ NonExhaustiveSwitchStatement: } } -UnreachableSwitchCase: - problemMessage: "This case is covered by the previous cases." - analyzerCode: UNREACHABLE_SWITCH_CASE - severity: WARNING # TODO(johnniwinther): Should this be an error, warning or not emitted at all? - script: | - enum Enum { a, b } - method(Enum e) { - switch (e) { - case Enum.a: - break; - case Enum.b: - break; - case Enum.a: - break; - } - } - PatternTypeMismatchInIrrefutableContext: problemMessage: "The matched value of type '#type' isn't assignable to the required type '#type2'." correctionMessage: "Try changing the required type of the pattern, or the matched value type." @@ -6985,27 +6909,6 @@ RestPatternInMapPattern: script: | test(dynamic x) { if (x case {1: 1, ...}) {} } -UnnecessaryNullAssertPattern: - problemMessage: The null-assert pattern will have no effect because the matched type isn't nullable. - correctionMessage: Try replacing the null-assert pattern with its nested pattern. - analyzerCode: UNNECESSARY_NULL_ASSERT_PATTERN - severity: WARNING - script: | - method(List list) { - if (list case [var a!]) {} - } - -UnnecessaryNullCheckPattern: - problemMessage: The null-check pattern will have no effect because the matched type isn't nullable. - correctionMessage: Try replacing the null-check pattern with its nested pattern. - analyzerCode: UNNECESSARY_NULL_CHECK_PATTERN - comment: No parameters. - severity: WARNING - script: | - method(List list) { - if (list case [var a?]) {} - } - NonBoolCondition: problemMessage: "Conditions must have a static type of 'bool'." correctionMessage: Try changing the condition. diff --git a/pkg/front_end/testcases/general/constants/various2.dart.strong.expect b/pkg/front_end/testcases/general/constants/various2.dart.strong.expect index 4a656efdd91..77aa8056b0a 100644 --- a/pkg/front_end/testcases/general/constants/various2.dart.strong.expect +++ b/pkg/front_end/testcases/general/constants/various2.dart.strong.expect @@ -51,14 +51,6 @@ library; // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various2.dart:12:34: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullTrue = barFromEnvOrNull ?? true; -// ^ -// -// pkg/front_end/testcases/general/constants/various2.dart:13:35: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullFalse = barFromEnvOrNull ?? false; -// ^ -// // pkg/front_end/testcases/general/constants/various2.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. // const String.fromEnvironment("bar", defaultValue: null); // ^ diff --git a/pkg/front_end/testcases/general/constants/various2.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/various2.dart.strong.transformed.expect index 4bf50902be3..c85646176bc 100644 --- a/pkg/front_end/testcases/general/constants/various2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/constants/various2.dart.strong.transformed.expect @@ -51,14 +51,6 @@ library; // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various2.dart:12:34: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullTrue = barFromEnvOrNull ?? true; -// ^ -// -// pkg/front_end/testcases/general/constants/various2.dart:13:35: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullFalse = barFromEnvOrNull ?? false; -// ^ -// // pkg/front_end/testcases/general/constants/various2.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. // const String.fromEnvironment("bar", defaultValue: null); // ^ diff --git a/pkg/front_end/testcases/general/constants/various2.dart.weak.expect b/pkg/front_end/testcases/general/constants/various2.dart.weak.expect index 6b987e527fa..e78049d914e 100644 --- a/pkg/front_end/testcases/general/constants/various2.dart.weak.expect +++ b/pkg/front_end/testcases/general/constants/various2.dart.weak.expect @@ -51,14 +51,6 @@ library; // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various2.dart:12:34: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullTrue = barFromEnvOrNull ?? true; -// ^ -// -// pkg/front_end/testcases/general/constants/various2.dart:13:35: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullFalse = barFromEnvOrNull ?? false; -// ^ -// // pkg/front_end/testcases/general/constants/various2.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. // const String.fromEnvironment("bar", defaultValue: null); // ^ diff --git a/pkg/front_end/testcases/general/constants/various2.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/various2.dart.weak.modular.expect index 6b987e527fa..e78049d914e 100644 --- a/pkg/front_end/testcases/general/constants/various2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/constants/various2.dart.weak.modular.expect @@ -51,14 +51,6 @@ library; // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various2.dart:12:34: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullTrue = barFromEnvOrNull ?? true; -// ^ -// -// pkg/front_end/testcases/general/constants/various2.dart:13:35: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullFalse = barFromEnvOrNull ?? false; -// ^ -// // pkg/front_end/testcases/general/constants/various2.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. // const String.fromEnvironment("bar", defaultValue: null); // ^ diff --git a/pkg/front_end/testcases/general/constants/various2.dart.weak.outline.expect b/pkg/front_end/testcases/general/constants/various2.dart.weak.outline.expect index b68c90bcfa0..98921a846ea 100644 --- a/pkg/front_end/testcases/general/constants/various2.dart.weak.outline.expect +++ b/pkg/front_end/testcases/general/constants/various2.dart.weak.outline.expect @@ -51,14 +51,6 @@ library; // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various2.dart:12:34: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullTrue = barFromEnvOrNull ?? true; -// ^ -// -// pkg/front_end/testcases/general/constants/various2.dart:13:35: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullFalse = barFromEnvOrNull ?? false; -// ^ -// // pkg/front_end/testcases/general/constants/various2.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. // const String.fromEnvironment("bar", defaultValue: null); // ^ diff --git a/pkg/front_end/testcases/general/constants/various2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/various2.dart.weak.transformed.expect index 479bbd9e127..17fea424079 100644 --- a/pkg/front_end/testcases/general/constants/various2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/constants/various2.dart.weak.transformed.expect @@ -51,14 +51,6 @@ library; // const bool.fromEnvironment("bar", defaultValue: null); // ^ // -// pkg/front_end/testcases/general/constants/various2.dart:12:34: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullTrue = barFromEnvOrNull ?? true; -// ^ -// -// pkg/front_end/testcases/general/constants/various2.dart:13:35: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNullFalse = barFromEnvOrNull ?? false; -// ^ -// // pkg/front_end/testcases/general/constants/various2.dart:25:51: Error: The value 'null' can't be assigned to the parameter type 'String' because 'String' is not nullable. // const String.fromEnvironment("bar", defaultValue: null); // ^ diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect index eaa05622784..be4dd207b1d 100644 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect +++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect @@ -13,10 +13,6 @@ library; // const fromDeferredLib = lib.x; // ^^^ // -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:14:30: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNull = barFromEnvOrNull ?? true; -// ^ -// // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. // - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. // const Class.method(T t) : this(-t); diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect index 59b3b72a388..fb6032da308 100644 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect @@ -13,10 +13,6 @@ library; // const fromDeferredLib = lib.x; // ^^^ // -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:14:30: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNull = barFromEnvOrNull ?? true; -// ^ -// // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. // - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. // const Class.method(T t) : this(-t); diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect index eba7dd65e93..0e84339050b 100644 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect +++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect @@ -13,10 +13,6 @@ library; // const fromDeferredLib = lib.x; // ^^^ // -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:14:30: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNull = barFromEnvOrNull ?? true; -// ^ -// // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. // - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. // const Class.method(T t) : this(-t); diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.modular.expect index eba7dd65e93..0e84339050b 100644 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.modular.expect @@ -13,10 +13,6 @@ library; // const fromDeferredLib = lib.x; // ^^^ // -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:14:30: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNull = barFromEnvOrNull ?? true; -// ^ -// // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. // - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. // const Class.method(T t) : this(-t); diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.outline.expect index f524b8f9058..36459fdf342 100644 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.outline.expect +++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.outline.expect @@ -13,10 +13,6 @@ library; // const fromDeferredLib = lib.x; // ^^^ // -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:14:30: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNull = barFromEnvOrNull ?? true; -// ^ -// // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. // - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. // const Class.method(T t) : this(-t); diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect index 508cf470d57..39edb4048d4 100644 --- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect @@ -13,10 +13,6 @@ library; // const fromDeferredLib = lib.x; // ^^^ // -// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:14:30: Warning: Operand of null-aware operation '??' has type 'bool' which excludes null. -// const bool nullAwareOnNull = barFromEnvOrNull ?? true; -// ^ -// // pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:101:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'. // - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'. // const Class.method(T t) : this(-t); diff --git a/pkg/front_end/testcases/general/issue47223a.dart.strong.expect b/pkg/front_end/testcases/general/issue47223a.dart.strong.expect index f12079c4a8f..1ce4e459be9 100644 --- a/pkg/front_end/testcases/general/issue47223a.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue47223a.dart.strong.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223a.dart:6:4: Warning: Operand of null-aware operation '??' has type 'Never' which excludes null. -// (throw "some value") ?? "some other value"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223a.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue47223a.dart.strong.transformed.expect index f12079c4a8f..1ce4e459be9 100644 --- a/pkg/front_end/testcases/general/issue47223a.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue47223a.dart.strong.transformed.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223a.dart:6:4: Warning: Operand of null-aware operation '??' has type 'Never' which excludes null. -// (throw "some value") ?? "some other value"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223a.dart.weak.expect b/pkg/front_end/testcases/general/issue47223a.dart.weak.expect index f12079c4a8f..1ce4e459be9 100644 --- a/pkg/front_end/testcases/general/issue47223a.dart.weak.expect +++ b/pkg/front_end/testcases/general/issue47223a.dart.weak.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223a.dart:6:4: Warning: Operand of null-aware operation '??' has type 'Never' which excludes null. -// (throw "some value") ?? "some other value"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223a.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue47223a.dart.weak.modular.expect index f12079c4a8f..1ce4e459be9 100644 --- a/pkg/front_end/testcases/general/issue47223a.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/issue47223a.dart.weak.modular.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223a.dart:6:4: Warning: Operand of null-aware operation '??' has type 'Never' which excludes null. -// (throw "some value") ?? "some other value"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223a.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47223a.dart.weak.transformed.expect index f12079c4a8f..1ce4e459be9 100644 --- a/pkg/front_end/testcases/general/issue47223a.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/issue47223a.dart.weak.transformed.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223a.dart:6:4: Warning: Operand of null-aware operation '??' has type 'Never' which excludes null. -// (throw "some value") ?? "some other value"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223b.dart.strong.expect b/pkg/front_end/testcases/general/issue47223b.dart.strong.expect index b4f8918aae3..a0df2dcda62 100644 --- a/pkg/front_end/testcases/general/issue47223b.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue47223b.dart.strong.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223b.dart:6:24: Warning: Operand of null-aware operation '??=' has type 'Never' which excludes null. -// (throw "some value").foo ??= "foo"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223b.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue47223b.dart.strong.transformed.expect index b4f8918aae3..a0df2dcda62 100644 --- a/pkg/front_end/testcases/general/issue47223b.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue47223b.dart.strong.transformed.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223b.dart:6:24: Warning: Operand of null-aware operation '??=' has type 'Never' which excludes null. -// (throw "some value").foo ??= "foo"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223b.dart.weak.expect b/pkg/front_end/testcases/general/issue47223b.dart.weak.expect index b4f8918aae3..a0df2dcda62 100644 --- a/pkg/front_end/testcases/general/issue47223b.dart.weak.expect +++ b/pkg/front_end/testcases/general/issue47223b.dart.weak.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223b.dart:6:24: Warning: Operand of null-aware operation '??=' has type 'Never' which excludes null. -// (throw "some value").foo ??= "foo"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223b.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue47223b.dart.weak.modular.expect index b4f8918aae3..a0df2dcda62 100644 --- a/pkg/front_end/testcases/general/issue47223b.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/issue47223b.dart.weak.modular.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223b.dart:6:24: Warning: Operand of null-aware operation '??=' has type 'Never' which excludes null. -// (throw "some value").foo ??= "foo"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue47223b.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue47223b.dart.weak.transformed.expect index b4f8918aae3..a0df2dcda62 100644 --- a/pkg/front_end/testcases/general/issue47223b.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/issue47223b.dart.weak.transformed.expect @@ -1,11 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue47223b.dart:6:24: Warning: Operand of null-aware operation '??=' has type 'Never' which excludes null. -// (throw "some value").foo ??= "foo"; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue49127.dart.strong.expect b/pkg/front_end/testcases/general/issue49127.dart.strong.expect index ae8c8893cb4..c6a76157b38 100644 --- a/pkg/front_end/testcases/general/issue49127.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue49127.dart.strong.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue49127.dart:10:3: Warning: The extension 'E' cannot be null. -// Try replacing '?.' with '.' -// E?.s; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue49127.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue49127.dart.strong.transformed.expect index ae8c8893cb4..c6a76157b38 100644 --- a/pkg/front_end/testcases/general/issue49127.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue49127.dart.strong.transformed.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue49127.dart:10:3: Warning: The extension 'E' cannot be null. -// Try replacing '?.' with '.' -// E?.s; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue49127.dart.weak.expect b/pkg/front_end/testcases/general/issue49127.dart.weak.expect index ae8c8893cb4..c6a76157b38 100644 --- a/pkg/front_end/testcases/general/issue49127.dart.weak.expect +++ b/pkg/front_end/testcases/general/issue49127.dart.weak.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue49127.dart:10:3: Warning: The extension 'E' cannot be null. -// Try replacing '?.' with '.' -// E?.s; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue49127.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue49127.dart.weak.modular.expect index ae8c8893cb4..c6a76157b38 100644 --- a/pkg/front_end/testcases/general/issue49127.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/issue49127.dart.weak.modular.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue49127.dart:10:3: Warning: The extension 'E' cannot be null. -// Try replacing '?.' with '.' -// E?.s; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/issue49127.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue49127.dart.weak.transformed.expect index ae8c8893cb4..c6a76157b38 100644 --- a/pkg/front_end/testcases/general/issue49127.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/issue49127.dart.weak.transformed.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue49127.dart:10:3: Warning: The extension 'E' cannot be null. -// Try replacing '?.' with '.' -// E?.s; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/general/many_errors2.dart.strong.expect b/pkg/front_end/testcases/general/many_errors2.dart.strong.expect index bd3d99b8b64..16f134c90f8 100644 --- a/pkg/front_end/testcases/general/many_errors2.dart.strong.expect +++ b/pkg/front_end/testcases/general/many_errors2.dart.strong.expect @@ -39,11 +39,6 @@ library; // const AbstractClass.id(); // ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/many_errors2.dart:29:12: Warning: Operand of null-aware operation '??=' has type 'B' which excludes null. -// - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. -// (new C().b ??= new B()).b; -// ^ -// // pkg/front_end/testcases/general/many_errors2.dart:29:27: Error: The getter 'b' isn't defined for the class 'B'. // - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. // Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'. diff --git a/pkg/front_end/testcases/general/many_errors2.dart.strong.transformed.expect b/pkg/front_end/testcases/general/many_errors2.dart.strong.transformed.expect index bd3d99b8b64..16f134c90f8 100644 --- a/pkg/front_end/testcases/general/many_errors2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/many_errors2.dart.strong.transformed.expect @@ -39,11 +39,6 @@ library; // const AbstractClass.id(); // ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/many_errors2.dart:29:12: Warning: Operand of null-aware operation '??=' has type 'B' which excludes null. -// - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. -// (new C().b ??= new B()).b; -// ^ -// // pkg/front_end/testcases/general/many_errors2.dart:29:27: Error: The getter 'b' isn't defined for the class 'B'. // - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. // Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'. diff --git a/pkg/front_end/testcases/general/many_errors2.dart.weak.expect b/pkg/front_end/testcases/general/many_errors2.dart.weak.expect index bd3d99b8b64..16f134c90f8 100644 --- a/pkg/front_end/testcases/general/many_errors2.dart.weak.expect +++ b/pkg/front_end/testcases/general/many_errors2.dart.weak.expect @@ -39,11 +39,6 @@ library; // const AbstractClass.id(); // ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/many_errors2.dart:29:12: Warning: Operand of null-aware operation '??=' has type 'B' which excludes null. -// - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. -// (new C().b ??= new B()).b; -// ^ -// // pkg/front_end/testcases/general/many_errors2.dart:29:27: Error: The getter 'b' isn't defined for the class 'B'. // - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. // Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'. diff --git a/pkg/front_end/testcases/general/many_errors2.dart.weak.modular.expect b/pkg/front_end/testcases/general/many_errors2.dart.weak.modular.expect index bd3d99b8b64..16f134c90f8 100644 --- a/pkg/front_end/testcases/general/many_errors2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/general/many_errors2.dart.weak.modular.expect @@ -39,11 +39,6 @@ library; // const AbstractClass.id(); // ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/many_errors2.dart:29:12: Warning: Operand of null-aware operation '??=' has type 'B' which excludes null. -// - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. -// (new C().b ??= new B()).b; -// ^ -// // pkg/front_end/testcases/general/many_errors2.dart:29:27: Error: The getter 'b' isn't defined for the class 'B'. // - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. // Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'. diff --git a/pkg/front_end/testcases/general/many_errors2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/many_errors2.dart.weak.transformed.expect index bd3d99b8b64..16f134c90f8 100644 --- a/pkg/front_end/testcases/general/many_errors2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/general/many_errors2.dart.weak.transformed.expect @@ -39,11 +39,6 @@ library; // const AbstractClass.id(); // ^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/many_errors2.dart:29:12: Warning: Operand of null-aware operation '??=' has type 'B' which excludes null. -// - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. -// (new C().b ??= new B()).b; -// ^ -// // pkg/front_end/testcases/general/many_errors2.dart:29:27: Error: The getter 'b' isn't defined for the class 'B'. // - 'B' is from 'pkg/front_end/testcases/general/many_errors2.dart'. // Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'. 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 0cc2d3b2c2e..08e343f0f6c 100644 --- a/pkg/front_end/testcases/general/null_aware2.dart.strong.expect +++ b/pkg/front_end/testcases/general/null_aware2.dart.strong.expect @@ -6,46 +6,6 @@ library; // static int staticField; // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/null_aware2.dart:13:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField = 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField ??= 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:12:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field = 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:14:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// foo.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:15:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:16:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:8: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo?.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:19:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// int intValue = foo.field ?? 6; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:20:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// num numValue = foo.field ?? 4.5; -// ^ -// // pkg/front_end/testcases/general/null_aware2.dart:6:7: Error: Field 'field' should be initialized because its type 'int' doesn't allow null. // int field; // ^^^^^ 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 0cc2d3b2c2e..08e343f0f6c 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 @@ -6,46 +6,6 @@ library; // static int staticField; // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/null_aware2.dart:13:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField = 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField ??= 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:12:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field = 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:14:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// foo.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:15:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:16:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:8: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo?.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:19:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// int intValue = foo.field ?? 6; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:20:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// num numValue = foo.field ?? 4.5; -// ^ -// // pkg/front_end/testcases/general/null_aware2.dart:6:7: Error: Field 'field' should be initialized because its type 'int' doesn't allow null. // int field; // ^^^^^ 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 0cc2d3b2c2e..08e343f0f6c 100644 --- a/pkg/front_end/testcases/general/null_aware2.dart.weak.expect +++ b/pkg/front_end/testcases/general/null_aware2.dart.weak.expect @@ -6,46 +6,6 @@ library; // static int staticField; // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/null_aware2.dart:13:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField = 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField ??= 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:12:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field = 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:14:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// foo.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:15:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:16:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:8: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo?.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:19:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// int intValue = foo.field ?? 6; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:20:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// num numValue = foo.field ?? 4.5; -// ^ -// // pkg/front_end/testcases/general/null_aware2.dart:6:7: Error: Field 'field' should be initialized because its type 'int' doesn't allow null. // int field; // ^^^^^ 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 0cc2d3b2c2e..08e343f0f6c 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 @@ -6,46 +6,6 @@ library; // static int staticField; // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/null_aware2.dart:13:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField = 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField ??= 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:12:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field = 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:14:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// foo.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:15:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:16:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:8: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo?.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:19:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// int intValue = foo.field ?? 6; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:20:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// num numValue = foo.field ?? 4.5; -// ^ -// // pkg/front_end/testcases/general/null_aware2.dart:6:7: Error: Field 'field' should be initialized because its type 'int' doesn't allow null. // int field; // ^^^^^ 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 0cc2d3b2c2e..08e343f0f6c 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 @@ -6,46 +6,6 @@ library; // static int staticField; // ^^^^^^^^^^^ // -// pkg/front_end/testcases/general/null_aware2.dart:13:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField = 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:3: Warning: The class 'Foo' cannot be null. -// Try replacing '?.' with '.' -// Foo?.staticField ??= 5; -// ^^^ -// -// pkg/front_end/testcases/general/null_aware2.dart:12:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field = 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:14:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// foo.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:15:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:16:3: Warning: Operand of null-aware operation '?.' has type 'Foo' which excludes null. -// - 'Foo' is from 'pkg/front_end/testcases/general/null_aware2.dart'. -// foo?.field ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:17:8: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo?.staticField ??= 5; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:19:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// int intValue = foo.field ?? 6; -// ^ -// -// pkg/front_end/testcases/general/null_aware2.dart:20:22: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// num numValue = foo.field ?? 4.5; -// ^ -// // pkg/front_end/testcases/general/null_aware2.dart:6:7: Error: Field 'field' should be initialized because its type 'int' doesn't allow null. // int field; // ^^^^^ diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect index 510e80b4113..9fab7927ca0 100644 --- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect +++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect @@ -6,14 +6,6 @@ library test /*isLegacy*/; // // @dart=2.9 // ^^^^^^^^^^^^ // -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:37:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:67:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// import self as self; import "dart:core" as core; @@ -46,7 +38,7 @@ static method main() → dynamic { }; (core::bool*) →* core::int* g = (core::bool* b) → core::int* { if(b) { - return null; + return; } else { return 0; @@ -81,7 +73,7 @@ static method main() → dynamic { return 0; } else { - return null; + return; } }; (core::bool*) →* core::int* l = (core::bool* b) → core::int* { diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect index 510e80b4113..9fab7927ca0 100644 --- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect @@ -6,14 +6,6 @@ library test /*isLegacy*/; // // @dart=2.9 // ^^^^^^^^^^^^ // -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:37:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:67:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// import self as self; import "dart:core" as core; @@ -46,7 +38,7 @@ static method main() → dynamic { }; (core::bool*) →* core::int* g = (core::bool* b) → core::int* { if(b) { - return null; + return; } else { return 0; @@ -81,7 +73,7 @@ static method main() → dynamic { return 0; } else { - return null; + return; } }; (core::bool*) →* core::int* l = (core::bool* b) → core::int* { diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.expect index d4fe7d51dfc..23a74a6ba71 100644 --- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.expect +++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.expect @@ -1,15 +1,4 @@ library test /*isLegacy*/; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:37:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:67:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// import self as self; import "dart:core" as core; @@ -42,7 +31,7 @@ static method main() → dynamic { }; (core::bool*) →* core::int* g = (core::bool* b) → core::int* { if(b) { - return null; + return; } else { return 0; @@ -77,7 +66,7 @@ static method main() → dynamic { return 0; } else { - return null; + return; } }; (core::bool*) →* core::int* l = (core::bool* b) → core::int* { diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.modular.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.modular.expect index d4fe7d51dfc..23a74a6ba71 100644 --- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.modular.expect +++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.modular.expect @@ -1,15 +1,4 @@ library test /*isLegacy*/; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:37:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:67:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// import self as self; import "dart:core" as core; @@ -42,7 +31,7 @@ static method main() → dynamic { }; (core::bool*) →* core::int* g = (core::bool* b) → core::int* { if(b) { - return null; + return; } else { return 0; @@ -77,7 +66,7 @@ static method main() → dynamic { return 0; } else { - return null; + return; } }; (core::bool*) →* core::int* l = (core::bool* b) → core::int* { diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.transformed.expect index d4fe7d51dfc..23a74a6ba71 100644 --- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.weak.transformed.expect @@ -1,15 +1,4 @@ library test /*isLegacy*/; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:37:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// -// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:67:7: Warning: Must explicitly return a value from a non-void function. -// return; -// ^ -// import self as self; import "dart:core" as core; @@ -42,7 +31,7 @@ static method main() → dynamic { }; (core::bool*) →* core::int* g = (core::bool* b) → core::int* { if(b) { - return null; + return; } else { return 0; @@ -77,7 +66,7 @@ static method main() → dynamic { return 0; } else { - return null; + return; } }; (core::bool*) →* core::int* l = (core::bool* b) → core::int* { diff --git a/pkg/front_end/testcases/inference/future_then_ifNull2.dart b/pkg/front_end/testcases/inference/future_then_ifNull2.dart index b0330a1ba15..9850ee22d7b 100644 --- a/pkg/front_end/testcases/inference/future_then_ifNull2.dart +++ b/pkg/front_end/testcases/inference/future_then_ifNull2.dart @@ -24,7 +24,6 @@ void test(MyFuture f) { }); Future t5 = f. /*@typeArgs=int*/ /*@target=MyFuture.then*/ then( /*@returnType=FutureOr*/ (/*@type=int*/ x) => - // error:INVALID_CAST_FUNCTION_EXPR x ?? new Future.value(3)); Future t6 = f. /*@typeArgs=int*/ /*@target=MyFuture.then*/ then( /*@returnType=FutureOr*/ (/*@type=int*/ x) { diff --git a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.strong.expect b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.strong.expect index 6d104648342..9c439256880 100644 --- a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.strong.expect +++ b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.strong.expect @@ -1,23 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:20:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? await new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:23:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future.value(3); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:28:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:31:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ x ?? new Future.value(3); -// ^ -// import self as self; import "dart:core" as core; import "dart:async" as asy; diff --git a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.strong.transformed.expect index 5c369a7163f..66d02f1a8df 100644 --- a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.strong.transformed.expect @@ -1,23 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:20:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? await new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:23:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future.value(3); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:28:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:31:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ x ?? new Future.value(3); -// ^ -// import self as self; import "dart:core" as core; import "dart:async" as asy; diff --git a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.expect b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.expect index 6d104648342..9c439256880 100644 --- a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.expect +++ b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.expect @@ -1,23 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:20:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? await new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:23:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future.value(3); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:28:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:31:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ x ?? new Future.value(3); -// ^ -// import self as self; import "dart:core" as core; import "dart:async" as asy; diff --git a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.modular.expect b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.modular.expect index 6d104648342..9c439256880 100644 --- a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.modular.expect @@ -1,23 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:20:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? await new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:23:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future.value(3); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:28:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:31:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ x ?? new Future.value(3); -// ^ -// import self as self; import "dart:core" as core; import "dart:async" as asy; diff --git a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.transformed.expect index 5c369a7163f..66d02f1a8df 100644 --- a/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/inference/future_then_ifNull2.dart.weak.transformed.expect @@ -1,23 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:20:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? await new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:23:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ await x ?? new Future.value(3); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:28:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// x ?? new Future.value(3)); -// ^ -// -// pkg/front_end/testcases/inference/future_then_ifNull2.dart:31:41: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return /*info:DOWN_CAST_COMPOSITE*/ x ?? new Future.value(3); -// ^ -// import self as self; import "dart:core" as core; import "dart:async" as asy; diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect index 9cf0898afb4..94a9cdbfddf 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.expect @@ -2,11 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:17:12: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// final s2 = s1?.length; -// ^ -// // pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. // final s3 = new List.filled(2, null); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect index 3c0585023e9..369ef0bd993 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.strong.transformed.expect @@ -2,11 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:17:12: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// final s2 = s1?.length; -// ^ -// // pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. // final s3 = new List.filled(2, null); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.expect index 9cf0898afb4..94a9cdbfddf 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.expect @@ -2,11 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:17:12: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// final s2 = s1?.length; -// ^ -// // pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. // final s3 = new List.filled(2, null); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.modular.expect index 9cf0898afb4..94a9cdbfddf 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.modular.expect @@ -2,11 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:17:12: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// final s2 = s1?.length; -// ^ -// // pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. // final s3 = new List.filled(2, null); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.outline.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.outline.expect index c0b4767522e..90634dd1aa2 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.outline.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.outline.expect @@ -2,11 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:17:12: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// final s2 = s1?.length; -// ^ -// // pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. // final s3 = new List.filled(2, null); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.transformed.expect index 86314882698..a3bee522406 100644 --- a/pkg/front_end/testcases/nnbd/issue41102.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue41102.dart.weak.transformed.expect @@ -2,11 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue41102.dart:17:12: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// final s2 = s1?.length; -// ^ -// // pkg/front_end/testcases/nnbd/issue41102.dart:19:36: Error: The value 'null' can't be assigned to the parameter type 'int' because 'int' is not nullable. // final s3 = new List.filled(2, null); // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.expect index fe974d226e9..c2d346aaf34 100644 --- a/pkg/front_end/testcases/nnbd/issue42758.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.expect @@ -2,10 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'. // var l3 = [...n2]; // ^ @@ -14,10 +10,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'. // var s3 = {...n2, n1}; // ^ @@ -26,10 +18,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'. // var m3 = {...n2, n1: n1}; // ^ @@ -38,10 +26,6 @@ library; // var m5 = {...n3, n1: n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'. // var l3 = [...n2]; // ^ @@ -50,10 +34,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'. // var s3 = {...n2, n1}; // ^ @@ -62,10 +42,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'. // var m3 = {...n2, n1: n1}; // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect index ac7fc6aa40a..95e3ae24160 100644 --- a/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42758.dart.strong.transformed.expect @@ -2,10 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'. // var l3 = [...n2]; // ^ @@ -14,10 +10,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'. // var s3 = {...n2, n1}; // ^ @@ -26,10 +18,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'. // var m3 = {...n2, n1: n1}; // ^ @@ -38,10 +26,6 @@ library; // var m5 = {...n3, n1: n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'. // var l3 = [...n2]; // ^ @@ -50,10 +34,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'. // var s3 = {...n2, n1}; // ^ @@ -62,10 +42,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'. // var m3 = {...n2, n1: n1}; // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.expect index 665e19773d8..5b77338f74c 100644 --- a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.expect @@ -2,10 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'. // var l3 = [...n2]; // ^ @@ -14,10 +10,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'. // var s3 = {...n2, n1}; // ^ @@ -26,10 +18,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'. // var m3 = {...n2, n1: n1}; // ^ @@ -38,10 +26,6 @@ library; // var m5 = {...n3, n1: n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'. // var l3 = [...n2]; // ^ @@ -50,10 +34,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'. // var s3 = {...n2, n1}; // ^ @@ -62,10 +42,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'. // var m3 = {...n2, n1: n1}; // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.modular.expect index 665e19773d8..5b77338f74c 100644 --- a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.modular.expect @@ -2,10 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'. // var l3 = [...n2]; // ^ @@ -14,10 +10,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'. // var s3 = {...n2, n1}; // ^ @@ -26,10 +18,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'. // var m3 = {...n2, n1: n1}; // ^ @@ -38,10 +26,6 @@ library; // var m5 = {...n3, n1: n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'. // var l3 = [...n2]; // ^ @@ -50,10 +34,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'. // var s3 = {...n2, n1}; // ^ @@ -62,10 +42,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'. // var m3 = {...n2, n1: n1}; // ^ diff --git a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect index 8365f82bae4..090743cba06 100644 --- a/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue42758.dart.weak.transformed.expect @@ -2,10 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/issue42758.dart:7:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:8:16: Error: Can't spread a value with static type 'Never?'. // var l3 = [...n2]; // ^ @@ -14,10 +10,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:13:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:14:16: Error: Can't spread a value with static type 'Never?'. // var s3 = {...n2, n1}; // ^ @@ -26,10 +18,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:19:17: Warning: Operand of null-aware operation '...?' has type 'Never' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:20:16: Error: Can't spread a value with static type 'Never?'. // var m3 = {...n2, n1: n1}; // ^ @@ -38,10 +26,6 @@ library; // var m5 = {...n3, n1: n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:29:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var l2 = [...?n1]; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:30:16: Error: Can't spread a value with static type 'N2'. // var l3 = [...n2]; // ^ @@ -50,10 +34,6 @@ library; // var l5 = [...n3]; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:35:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var s2 = {...?n1, n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:36:16: Error: Can't spread a value with static type 'N2'. // var s3 = {...n2, n1}; // ^ @@ -62,10 +42,6 @@ library; // var s5 = {...n3, n1}; // ^ // -// pkg/front_end/testcases/nnbd/issue42758.dart:41:17: Warning: Operand of null-aware operation '...?' has type 'N1' which excludes null. -// var m2 = {...?n1, n1: n1}; -// ^ -// // pkg/front_end/testcases/nnbd/issue42758.dart:42:16: Error: Can't spread a value with static type 'N2'. // var m3 = {...n2, n1: n1}; // ^ diff --git a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.strong.expect index 497e1ce355c..cd864ce23c8 100644 --- a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.strong.expect @@ -1,16 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:14: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:24: Warning: Operand of null-aware operation '!' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/issue_39286_2.dart'. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.strong.transformed.expect index 497e1ce355c..cd864ce23c8 100644 --- a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.strong.transformed.expect @@ -1,16 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:14: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:24: Warning: Operand of null-aware operation '!' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/issue_39286_2.dart'. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.expect index 497e1ce355c..cd864ce23c8 100644 --- a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.expect @@ -1,16 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:14: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:24: Warning: Operand of null-aware operation '!' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/issue_39286_2.dart'. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.modular.expect index 497e1ce355c..cd864ce23c8 100644 --- a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.modular.expect @@ -1,16 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:14: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:24: Warning: Operand of null-aware operation '!' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/issue_39286_2.dart'. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.transformed.expect index 497e1ce355c..cd864ce23c8 100644 --- a/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/issue_39286_2.dart.weak.transformed.expect @@ -1,16 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:14: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// -// pkg/front_end/testcases/nnbd/issue_39286_2.dart:15:24: Warning: Operand of null-aware operation '!' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/issue_39286_2.dart'. -// x..f()!.g()['Hi!']!..h()!.y = 2; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.expect index 3a4109c860d..12073aaa2b0 100644 --- a/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.expect @@ -2,26 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/never_receiver.dart:24:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.foo(); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:25:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.bar; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:26:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.baz = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:28:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42] = 42; // Warning. -// ^ -// // pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'. // Try correcting the name to the name of an existing method, or defining a method named 'foo'. // y.foo(); // Error. diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.transformed.expect index e0b0a9e0491..0e4756ea76c 100644 --- a/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.strong.transformed.expect @@ -2,26 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/never_receiver.dart:24:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.foo(); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:25:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.bar; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:26:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.baz = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:28:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42] = 42; // Warning. -// ^ -// // pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'. // Try correcting the name to the name of an existing method, or defining a method named 'foo'. // y.foo(); // Error. diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.expect index b8696de9c26..a24383e2c8e 100644 --- a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.expect @@ -2,26 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/never_receiver.dart:24:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.foo(); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:25:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.bar; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:26:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.baz = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:28:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42] = 42; // Warning. -// ^ -// // pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'. // Try correcting the name to the name of an existing method, or defining a method named 'foo'. // y.foo(); // Error. diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.modular.expect index b8696de9c26..a24383e2c8e 100644 --- a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.modular.expect @@ -2,26 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/never_receiver.dart:24:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.foo(); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:25:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.bar; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:26:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.baz = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:28:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42] = 42; // Warning. -// ^ -// // pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'. // Try correcting the name to the name of an existing method, or defining a method named 'foo'. // y.foo(); // Error. diff --git a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.transformed.expect index 91813e80551..a077f7cb292 100644 --- a/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/never_receiver.dart.weak.transformed.expect @@ -2,26 +2,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/never_receiver.dart:24:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.foo(); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:25:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.bar; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:26:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?.baz = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/never_receiver.dart:28:3: Warning: Operand of null-aware operation '?.' has type 'Never' which excludes null. -// x?[42] = 42; // Warning. -// ^ -// // pkg/front_end/testcases/nnbd/never_receiver.dart:30:5: Error: The method 'foo' isn't defined for the class 'Never?'. // Try correcting the name to the name of an existing method, or defining a method named 'foo'. // y.foo(); // Error. diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.strong.expect b/pkg/front_end/testcases/nnbd/null_access.dart.strong.expect index 9bb3d5c6103..83bf459a0fc 100644 --- a/pkg/front_end/testcases/nnbd/null_access.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/null_access.dart.strong.expect @@ -74,26 +74,12 @@ library; // nullableClass?.nullableField += 2; // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok -// ^ -// // pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null. // - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. // Try calling using ?.call instead. // nullableClass(); // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:59:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass(); // ok -// ^ -// -// pkg/front_end/testcases/nnbd/null_access.dart:60:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass.nonNullableClass(); // ok -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/null_access.dart.strong.transformed.expect index 4ad9ef26ba9..30dfb55d982 100644 --- a/pkg/front_end/testcases/nnbd/null_access.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_access.dart.strong.transformed.expect @@ -74,26 +74,12 @@ library; // nullableClass?.nullableField += 2; // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok -// ^ -// // pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null. // - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. // Try calling using ?.call instead. // nullableClass(); // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:59:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass(); // ok -// ^ -// -// pkg/front_end/testcases/nnbd/null_access.dart:60:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass.nonNullableClass(); // ok -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.weak.expect b/pkg/front_end/testcases/nnbd/null_access.dart.weak.expect index 9bb3d5c6103..83bf459a0fc 100644 --- a/pkg/front_end/testcases/nnbd/null_access.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/null_access.dart.weak.expect @@ -74,26 +74,12 @@ library; // nullableClass?.nullableField += 2; // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok -// ^ -// // pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null. // - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. // Try calling using ?.call instead. // nullableClass(); // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:59:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass(); // ok -// ^ -// -// pkg/front_end/testcases/nnbd/null_access.dart:60:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass.nonNullableClass(); // ok -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/null_access.dart.weak.modular.expect index 9bb3d5c6103..83bf459a0fc 100644 --- a/pkg/front_end/testcases/nnbd/null_access.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/null_access.dart.weak.modular.expect @@ -74,26 +74,12 @@ library; // nullableClass?.nullableField += 2; // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok -// ^ -// // pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null. // - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. // Try calling using ?.call instead. // nullableClass(); // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:59:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass(); // ok -// ^ -// -// pkg/front_end/testcases/nnbd/null_access.dart:60:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass.nonNullableClass(); // ok -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_access.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/null_access.dart.weak.transformed.expect index 4ad9ef26ba9..30dfb55d982 100644 --- a/pkg/front_end/testcases/nnbd/null_access.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_access.dart.weak.transformed.expect @@ -74,26 +74,12 @@ library; // nullableClass?.nullableField += 2; // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:54:35: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// nullableClass?.nonNullableClass.nonNullableField ??= 0; // ok -// ^ -// // pkg/front_end/testcases/nnbd/null_access.dart:57:16: Error: Can't use an expression of type 'Class?' as a function because it's potentially null. // - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. // Try calling using ?.call instead. // nullableClass(); // error // ^ // -// pkg/front_end/testcases/nnbd/null_access.dart:59:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass(); // ok -// ^ -// -// pkg/front_end/testcases/nnbd/null_access.dart:60:3: Warning: Operand of null-aware operation '?.' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_access.dart'. -// nonNullableClass?.nonNullableClass.nonNullableClass(); // ok -// ^ -// import self as self; import "dart:core" as core; 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 8dabc51d324..67d0dd2735b 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 @@ -1,67 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:17:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:18:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:19:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:21:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:22:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:23:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:24:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0] = 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:25:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property2[0] ??= 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:26:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember2 ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:27:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember += 2; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:28:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember++; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:29:5: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// --C?.staticMember; -// ^ -// import self as self; import "dart:core" as core; 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 c3f26ad8135..af3599e2f15 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 @@ -1,67 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:17:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:18:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:19:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:21:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:22:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:23:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:24:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0] = 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:25:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property2[0] ??= 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:26:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember2 ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:27:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember += 2; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:28:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember++; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:29:5: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// --C?.staticMember; -// ^ -// import self as self; import "dart:core" as core; 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 8dabc51d324..67d0dd2735b 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 @@ -1,67 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:17:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:18:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:19:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:21:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:22:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:23:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:24:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0] = 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:25:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property2[0] ??= 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:26:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember2 ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:27:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember += 2; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:28:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember++; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:29:5: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// --C?.staticMember; -// ^ -// import self as self; import "dart:core" as core; 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 8dabc51d324..67d0dd2735b 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 @@ -1,67 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:17:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:18:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:19:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:21:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:22:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:23:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:24:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0] = 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:25:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property2[0] ??= 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:26:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember2 ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:27:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember += 2; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:28:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember++; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:29:5: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// --C?.staticMember; -// ^ -// import self as self; import "dart:core" as core; 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 c3f26ad8135..af3599e2f15 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 @@ -1,67 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:17:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:18:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:19:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:21:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:22:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:23:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:24:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property[0] = 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:25:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.property2[0] ??= 0; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:26:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember2 ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:27:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember += 2; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:28:3: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// C?.staticMember++; -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_static_access.dart:29:5: Warning: The class 'C' cannot be null. -// Try replacing '?.' with '.' -// --C?.staticMember; -// ^ -// import self as self; import "dart:core" as core; 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 c68216bc198..aed7b3407fb 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 @@ -1,117 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:12:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:13:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 = 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:14:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:15:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:16:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:17:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:18:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:19:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:20:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:21:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:22:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:23:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 ??= 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:24:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2 += 2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:25:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2++; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:26:7: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// --this?.m2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:27:5: Warning: Operand of null-aware operation '??' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/null_aware_this_access.dart'. -// this ?? new C(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:41:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:42:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:43:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] += 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:44:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:45:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:46:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] += 0; -// ^^^^ -// import self as self; import "dart:core" as core; 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 06ed08232a5..151b86f92ab 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 @@ -1,117 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:12:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:13:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 = 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:14:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:15:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:16:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:17:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:18:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:19:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:20:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:21:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:22:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:23:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 ??= 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:24:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2 += 2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:25:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2++; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:26:7: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// --this?.m2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:27:5: Warning: Operand of null-aware operation '??' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/null_aware_this_access.dart'. -// this ?? new C(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:41:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:42:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:43:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] += 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:44:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:45:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:46:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] += 0; -// ^^^^ -// import self as self; import "dart:core" as core; 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 c68216bc198..aed7b3407fb 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 @@ -1,117 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:12:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:13:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 = 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:14:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:15:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:16:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:17:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:18:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:19:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:20:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:21:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:22:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:23:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 ??= 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:24:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2 += 2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:25:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2++; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:26:7: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// --this?.m2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:27:5: Warning: Operand of null-aware operation '??' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/null_aware_this_access.dart'. -// this ?? new C(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:41:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:42:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:43:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] += 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:44:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:45:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:46:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] += 0; -// ^^^^ -// import self as self; import "dart:core" as core; 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 c68216bc198..aed7b3407fb 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 @@ -1,117 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:12:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:13:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 = 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:14:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:15:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:16:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:17:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:18:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:19:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:20:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:21:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:22:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:23:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 ??= 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:24:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2 += 2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:25:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2++; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:26:7: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// --this?.m2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:27:5: Warning: Operand of null-aware operation '??' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/null_aware_this_access.dart'. -// this ?? new C(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:41:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:42:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:43:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] += 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:44:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:45:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:46:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] += 0; -// ^^^^ -// import self as self; import "dart:core" as core; 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 06ed08232a5..151b86f92ab 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 @@ -1,117 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:12:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:13:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 = 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:14:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:15:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.m1; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:16:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property.method(); -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:17:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:18:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:19:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:20:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:21:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:22:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] ??= 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:23:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m1 ??= 42; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:24:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2 += 2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:25:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.m2++; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:26:7: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// --this?.m2; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:27:5: Warning: Operand of null-aware operation '??' has type 'C' which excludes null. -// - 'C' is from 'pkg/front_end/testcases/nnbd/null_aware_this_access.dart'. -// this ?? new C(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:41:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:42:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:43:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?[0] += 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:44:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0]; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:45:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] = 0; -// ^^^^ -// -// pkg/front_end/testcases/nnbd/null_aware_this_access.dart:46:5: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// this?.property[0] += 0; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_check.dart.strong.expect b/pkg/front_end/testcases/nnbd/null_check.dart.strong.expect index a49c03be19e..806051a4d10 100644 --- a/pkg/front_end/testcases/nnbd/null_check.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/null_check.dart.strong.expect @@ -1,90 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_check.dart:14:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:15:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:16:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:17:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:18:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:19:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method()!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:20:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:8: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:22:7: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:23:6: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// (c + c)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:10: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:17: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:18: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:5: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:12: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:22: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:20: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/null_check.dart.strong.transformed.expect index f544e4dcbf5..4070e832bfa 100644 --- a/pkg/front_end/testcases/nnbd/null_check.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_check.dart.strong.transformed.expect @@ -1,90 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_check.dart:14:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:15:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:16:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:17:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:18:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:19:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method()!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:20:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:8: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:22:7: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:23:6: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// (c + c)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:10: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:17: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:18: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:5: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:12: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:22: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:20: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_check.dart.weak.expect b/pkg/front_end/testcases/nnbd/null_check.dart.weak.expect index a49c03be19e..806051a4d10 100644 --- a/pkg/front_end/testcases/nnbd/null_check.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/null_check.dart.weak.expect @@ -1,90 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_check.dart:14:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:15:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:16:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:17:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:18:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:19:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method()!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:20:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:8: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:22:7: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:23:6: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// (c + c)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:10: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:17: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:18: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:5: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:12: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:22: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:20: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_check.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/null_check.dart.weak.modular.expect index a49c03be19e..806051a4d10 100644 --- a/pkg/front_end/testcases/nnbd/null_check.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/null_check.dart.weak.modular.expect @@ -1,90 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_check.dart:14:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:15:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:16:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:17:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:18:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:19:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method()!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:20:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:8: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:22:7: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:23:6: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// (c + c)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:10: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:17: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:18: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:5: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:12: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:22: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:20: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/null_check.dart.weak.transformed.expect index f544e4dcbf5..4070e832bfa 100644 --- a/pkg/front_end/testcases/nnbd/null_check.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_check.dart.weak.transformed.expect @@ -1,90 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_check.dart:14:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:15:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field = 42; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:16:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:17:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:18:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.field!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:19:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c!.method()!.toString(); -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:20:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:3: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:21:8: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c! + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:22:7: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// c + c!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:23:6: Warning: Operand of null-aware operation '!' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/null_check.dart'. -// (c + c)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:10: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:17: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:26:18: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !o! ? !o! : !!o!!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:5: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:12: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:22: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// -// pkg/front_end/testcases/nnbd/null_check.dart:27:20: Warning: Operand of null-aware operation '!' has type 'bool' which excludes null. -// !(o!) ? (!o)! : (!(!o)!)!; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.strong.expect b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.strong.expect index c80c333602c..ff9be7b8366 100644 --- a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.strong.expect @@ -1,59 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:31:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:32:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:42:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:43:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1 + c2[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:52:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:53:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1 + Extension(c2)[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:62:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:63:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:67:49: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] = 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:69:50: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] += 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:72:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:51: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.strong.transformed.expect index 7849cb1b000..38a65235b67 100644 --- a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.strong.transformed.expect @@ -1,59 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:31:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:32:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:42:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:43:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1 + c2[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:52:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:53:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1 + Extension(c2)[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:62:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:63:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:67:49: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] = 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:69:50: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] += 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:72:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:51: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.expect b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.expect index c80c333602c..ff9be7b8366 100644 --- a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.expect @@ -1,59 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:31:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:32:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:42:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:43:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1 + c2[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:52:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:53:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1 + Extension(c2)[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:62:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:63:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:67:49: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] = 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:69:50: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] += 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:72:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:51: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.modular.expect index c80c333602c..ff9be7b8366 100644 --- a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.modular.expect @@ -1,59 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:31:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:32:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:42:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:43:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1 + c2[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:52:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:53:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1 + Extension(c2)[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:62:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:63:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:67:49: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] = 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:69:50: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] += 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:72:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:51: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.transformed.expect index e7f05012d23..f5a24ccefea 100644 --- a/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/null_shorting_index.dart.weak.transformed.expect @@ -1,59 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:31:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:32:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:42:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:43:6: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c2?[0] ??= 1 + c2[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:52:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:53:17: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c2)?[0] ??= 1 + Extension(c2)[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:62:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:63:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// c1?.field?[0] ??= 1 + c1[1]; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:67:49: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] = 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:69:50: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] += 1 + (Extension(c2)?[0]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:72:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1; -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:24: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// -// pkg/front_end/testcases/nnbd/null_shorting_index.dart:73:51: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// Extension(c1?.field)?[0] ??= 1 + (Extension(c2)?[1]! as int); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.expect index 86fe442fe0d..c2321d0914f 100644 --- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.expect @@ -1,127 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(self)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(self)[self] ??= self; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.transformed.expect index 86fe442fe0d..c2321d0914f 100644 --- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.strong.transformed.expect @@ -1,127 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(self)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(self)[self] ??= self; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.expect index 86fe442fe0d..c2321d0914f 100644 --- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.expect @@ -1,127 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(self)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(self)[self] ??= self; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.modular.expect index 86fe442fe0d..c2321d0914f 100644 --- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.modular.expect @@ -1,127 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(self)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(self)[self] ??= self; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.transformed.expect index 86fe442fe0d..c2321d0914f 100644 --- a/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/pure_index_expressions.dart.weak.transformed.expect @@ -1,127 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:25:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:26:8: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:42:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:43:12: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = map[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:58:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:59:6: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:75:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:76:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = i[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:91:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:92:17: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:108:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:109:21: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension(i)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:126:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:127:10: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:143:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:144:14: Warning: Operand of null-aware operation '??=' has type 'Class' which excludes null. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = super[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:168:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:169:9: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:185:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = this[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:186:13: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = self[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:201:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:202:21: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// Extension2(self)[self] ??= self; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:218:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(this)[this] ??= this; -// ^ -// -// pkg/front_end/testcases/nnbd/pure_index_expressions.dart:219:25: Warning: Operand of null-aware operation '??=' has type 'Class2' which excludes null. -// - 'Class2' is from 'pkg/front_end/testcases/nnbd/pure_index_expressions.dart'. -// v = Extension2(self)[self] ??= self; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.strong.expect b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.strong.expect index f4860c96e87..93421dcb15b 100644 --- a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.strong.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:12:24: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// int? test1(A? a) => a?.zero!; -// ^ -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:14:25: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// bool? test3(A? a) => a?.zero!.isEven; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.strong.transformed.expect index f4860c96e87..93421dcb15b 100644 --- a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.strong.transformed.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:12:24: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// int? test1(A? a) => a?.zero!; -// ^ -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:14:25: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// bool? test3(A? a) => a?.zero!.isEven; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.expect b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.expect index f4860c96e87..93421dcb15b 100644 --- a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.expect +++ b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:12:24: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// int? test1(A? a) => a?.zero!; -// ^ -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:14:25: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// bool? test3(A? a) => a?.zero!.isEven; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.modular.expect b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.modular.expect index f4860c96e87..93421dcb15b 100644 --- a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.modular.expect +++ b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.modular.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:12:24: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// int? test1(A? a) => a?.zero!; -// ^ -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:14:25: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// bool? test3(A? a) => a?.zero!.isEven; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.transformed.expect index f4860c96e87..93421dcb15b 100644 --- a/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/nnbd/shorting_null_check.dart.weak.transformed.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:12:24: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// int? test1(A? a) => a?.zero!; -// ^ -// -// pkg/front_end/testcases/nnbd/shorting_null_check.dart:14:25: Warning: Operand of null-aware operation '!' has type 'int' which excludes null. -// bool? test3(A? a) => a?.zero!.isEven; -// ^ -// import self as self; import "dart:core" as core; 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 1eae8d381ed..9696100a866 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 @@ -1,105 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:22:10: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// super[42] ??= "bar"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:28:3: Warning: Operand of null-aware operation '?..' has type 'String' which excludes null. -// s?..length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:29:3: Warning: Operand of null-aware operation '??' has type 'String' which excludes null. -// s ?? "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:30:3: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// s ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:31:8: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// [...?l]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:32:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// var a = {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:33:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:34:16: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// var b = {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:35:21: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:36:3: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// s!; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:37:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.substring(0, 0); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:38:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:39:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length += 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:40:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:41:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.foo; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:42:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// E(s)[42] ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:43:4: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// l[42] ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:44:5: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:45:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l?..length ??= 42; // Warning. -// ^ -// import self as self; import "dart:core" as core; import "dart:collection" as col; 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 7c66b7472a6..cf10f55acee 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 @@ -1,105 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:22:10: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// super[42] ??= "bar"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:28:3: Warning: Operand of null-aware operation '?..' has type 'String' which excludes null. -// s?..length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:29:3: Warning: Operand of null-aware operation '??' has type 'String' which excludes null. -// s ?? "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:30:3: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// s ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:31:8: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// [...?l]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:32:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// var a = {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:33:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:34:16: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// var b = {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:35:21: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:36:3: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// s!; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:37:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.substring(0, 0); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:38:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:39:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length += 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:40:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:41:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.foo; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:42:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// E(s)[42] ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:43:4: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// l[42] ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:44:5: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:45:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l?..length ??= 42; // Warning. -// ^ -// import self as self; import "dart:core" as core; import "dart:collection" as col; 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 1eae8d381ed..9696100a866 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 @@ -1,105 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:22:10: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// super[42] ??= "bar"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:28:3: Warning: Operand of null-aware operation '?..' has type 'String' which excludes null. -// s?..length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:29:3: Warning: Operand of null-aware operation '??' has type 'String' which excludes null. -// s ?? "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:30:3: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// s ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:31:8: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// [...?l]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:32:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// var a = {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:33:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:34:16: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// var b = {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:35:21: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:36:3: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// s!; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:37:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.substring(0, 0); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:38:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:39:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length += 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:40:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:41:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.foo; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:42:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// E(s)[42] ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:43:4: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// l[42] ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:44:5: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:45:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l?..length ??= 42; // Warning. -// ^ -// import self as self; import "dart:core" as core; import "dart:collection" as col; 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 1eae8d381ed..9696100a866 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 @@ -1,105 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:22:10: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// super[42] ??= "bar"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:28:3: Warning: Operand of null-aware operation '?..' has type 'String' which excludes null. -// s?..length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:29:3: Warning: Operand of null-aware operation '??' has type 'String' which excludes null. -// s ?? "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:30:3: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// s ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:31:8: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// [...?l]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:32:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// var a = {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:33:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:34:16: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// var b = {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:35:21: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:36:3: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// s!; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:37:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.substring(0, 0); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:38:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:39:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length += 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:40:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:41:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.foo; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:42:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// E(s)[42] ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:43:4: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// l[42] ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:44:5: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:45:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l?..length ??= 42; // Warning. -// ^ -// import self as self; import "dart:core" as core; import "dart:collection" as col; 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 7c66b7472a6..cf10f55acee 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 @@ -1,105 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:22:10: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// super[42] ??= "bar"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:27:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:28:3: Warning: Operand of null-aware operation '?..' has type 'String' which excludes null. -// s?..length; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:29:3: Warning: Operand of null-aware operation '??' has type 'String' which excludes null. -// s ?? "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:30:3: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// s ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:31:8: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// [...?l]; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:32:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// var a = {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:33:16: Warning: Operand of null-aware operation '...?' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// {...?l}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:34:16: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// var b = {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:35:21: Warning: Operand of null-aware operation '...?' has type 'Map' which excludes null. -// - 'Map' is from 'dart:core'. -// {...?m}; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:36:3: Warning: Operand of null-aware operation '!' has type 'String' which excludes null. -// s!; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:37:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.substring(0, 0); // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:38:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:39:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length += 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:40:3: Warning: Operand of null-aware operation '?.' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:41:3: Warning: Operand of null-aware operation '?.' has type 'String' which excludes null. -// s?.foo; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:42:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// E(s)[42] ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:43:4: Warning: Operand of null-aware operation '??=' has type 'String' which excludes null. -// l[42] ??= "foo"; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:44:5: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l.length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:45:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length = 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:3: Warning: Operand of null-aware operation '?..' has type 'List' which excludes null. -// - 'List' is from 'dart:core'. -// l?..length ??= 42; // Warning. -// ^ -// -// pkg/front_end/testcases/nnbd/strictly_non_nullable_warnings.dart:46:7: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// l?..length ??= 42; // Warning. -// ^ -// import self as self; import "dart:core" as core; import "dart:collection" as col; 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 3419b07238f..d00af5d6d11 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 @@ -292,78 +292,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:13:23: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// ifNullOptIn(int i) => i ?? 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:22:66: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// extensionIfNullOptIn1(int i) => OptInExtension(new OptInClass1())[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:25:36: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// OptInExtension(new OptInClass1())[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:28:50: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// extensionIfNullOptIn2(int i) => new OptInClass1()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:31:20: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass1()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:39:48: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullIndexSetOptIn(int i) => new OptInClass2()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:42:20: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass2()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:51:53: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullPropertySetOptIn(int i) => new OptInClass3(i).field ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:54:22: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass3(i).field ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:57:26: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullSetOptIn(int i) => i ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:60:3: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// i ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:69:25: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// method(int i) => super[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:71:10: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// super[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:113:28: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// nullAwareAccess1(int i) => i?.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:116:3: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// i?.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:128:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return f() ?? -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:134:4: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// x[0] ??= f(); -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:138:4: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// f()?.gcd(0); // Should not throw if `f` returns null -// ^ -// // pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:195:10: Error: Not enough type information to disambiguate between literal set and literal map. // Try providing type arguments for the literal explicitly to disambiguate it. // return {...d}; // Should not throw ReachabilityError. 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 3419b07238f..d00af5d6d11 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 @@ -292,78 +292,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:13:23: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// ifNullOptIn(int i) => i ?? 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:22:66: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// extensionIfNullOptIn1(int i) => OptInExtension(new OptInClass1())[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:25:36: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// OptInExtension(new OptInClass1())[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:28:50: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// extensionIfNullOptIn2(int i) => new OptInClass1()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:31:20: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass1()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:39:48: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullIndexSetOptIn(int i) => new OptInClass2()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:42:20: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass2()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:51:53: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullPropertySetOptIn(int i) => new OptInClass3(i).field ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:54:22: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass3(i).field ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:57:26: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullSetOptIn(int i) => i ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:60:3: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// i ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:69:25: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// method(int i) => super[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:71:10: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// super[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:113:28: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// nullAwareAccess1(int i) => i?.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:116:3: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// i?.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:128:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return f() ?? -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:134:4: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// x[0] ??= f(); -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:138:4: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// f()?.gcd(0); // Should not throw if `f` returns null -// ^ -// // pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:195:10: Error: Not enough type information to disambiguate between literal set and literal map. // Try providing type arguments for the literal explicitly to disambiguate it. // return {...d}; // Should not throw ReachabilityError. 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 d694f26971c..d04329bb787 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 @@ -292,78 +292,6 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:13:23: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// ifNullOptIn(int i) => i ?? 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:22:66: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// extensionIfNullOptIn1(int i) => OptInExtension(new OptInClass1())[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:25:36: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// OptInExtension(new OptInClass1())[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:28:50: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// extensionIfNullOptIn2(int i) => new OptInClass1()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:31:20: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass1()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:39:48: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullIndexSetOptIn(int i) => new OptInClass2()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:42:20: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass2()[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:51:53: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullPropertySetOptIn(int i) => new OptInClass3(i).field ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:54:22: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// new OptInClass3(i).field ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:57:26: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// ifNullSetOptIn(int i) => i ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:60:3: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// i ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:69:25: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// method(int i) => super[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:71:10: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// super[i] ??= 42; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:113:28: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// nullAwareAccess1(int i) => i?.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:116:3: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// i?.isEven; -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:128:11: Warning: Operand of null-aware operation '??' has type 'int' which excludes null. -// return f() ?? -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:134:4: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// x[0] ??= f(); -// ^ -// -// pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:138:4: Warning: Operand of null-aware operation '?.' has type 'int' which excludes null. -// f()?.gcd(0); // Should not throw if `f` returns null -// ^ -// // pkg/front_end/testcases/nnbd_mixed/unsound_checks_lib.dart:195:10: Error: Not enough type information to disambiguate between literal set and literal map. // Try providing type arguments for the literal explicitly to disambiguate it. // return {...d}; // Should not throw ReachabilityError. diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.strong.expect index f992a220610..4f432707d22 100644 --- a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.strong.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart:36:23: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case [1, 2, 3]?) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.strong.transformed.expect index 4c03aed3c33..73366928349 100644 --- a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.strong.transformed.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart:36:23: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case [1, 2, 3]?) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.expect index f992a220610..4f432707d22 100644 --- a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.expect +++ b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart:36:23: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case [1, 2, 3]?) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.modular.expect index f992a220610..4f432707d22 100644 --- a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.modular.expect +++ b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.modular.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart:36:23: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case [1, 2, 3]?) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.transformed.expect index d28f358a870..854e48c7d7f 100644 --- a/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart.weak.transformed.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/list_pattern_inside_if_case.dart:36:23: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case [1, 2, 3]?) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.expect index fa888892361..f649d26afe6 100644 --- a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.expect @@ -1,22 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:11:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case var y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:12:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case int y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:13:22: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case String y?) {} -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.transformed.expect index fa888892361..f649d26afe6 100644 --- a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.strong.transformed.expect @@ -1,22 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:11:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case var y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:12:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case int y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:13:22: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case String y?) {} -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.expect index fa888892361..f649d26afe6 100644 --- a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.expect +++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.expect @@ -1,22 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:11:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case var y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:12:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case int y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:13:22: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case String y?) {} -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.modular.expect index fa888892361..f649d26afe6 100644 --- a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.modular.expect +++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.modular.expect @@ -1,22 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:11:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case var y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:12:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case int y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:13:22: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case String y?) {} -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.transformed.expect index fa888892361..f649d26afe6 100644 --- a/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/patterns/null_check_inside_if_case.dart.weak.transformed.expect @@ -1,22 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:11:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case var y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:12:19: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case int y?) {} -// ^ -// -// pkg/front_end/testcases/patterns/null_check_inside_if_case.dart:13:22: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (x case String y?) {} -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.strong.expect b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.strong.expect index 4c2eb257dbc..0cc4359c24a 100644 --- a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.strong.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart:32:45: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (x case (int _, double y, foo: String _!, bar: var _)) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.strong.transformed.expect index 6faa547d9d1..913248e88b4 100644 --- a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.strong.transformed.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart:32:45: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (x case (int _, double y, foo: String _!, bar: var _)) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.expect b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.expect index 4c2eb257dbc..0cc4359c24a 100644 --- a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.expect +++ b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart:32:45: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (x case (int _, double y, foo: String _!, bar: var _)) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.modular.expect index 4c2eb257dbc..0cc4359c24a 100644 --- a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.modular.expect +++ b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.modular.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart:32:45: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (x case (int _, double y, foo: String _!, bar: var _)) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.transformed.expect index 6faa547d9d1..913248e88b4 100644 --- a/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart.weak.transformed.expect @@ -1,12 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/patterns/records/record_pattern_inside_if_case.dart:32:45: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (x case (int _, double y, foo: String _!, bar: var _)) { -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/patterns/shared_errors.dart.strong.expect b/pkg/front_end/testcases/patterns/shared_errors.dart.strong.expect index 2c4631c7740..323127e310b 100644 --- a/pkg/front_end/testcases/patterns/shared_errors.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/shared_errors.dart.strong.expect @@ -67,16 +67,6 @@ library; // case {...}: // Error // ^ // -// pkg/front_end/testcases/patterns/shared_errors.dart:62:23: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// -// pkg/front_end/testcases/patterns/shared_errors.dart:62:31: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// // pkg/front_end/testcases/patterns/shared_errors.dart:68:21: Error: Conditions must have a static type of 'bool'. // Try changing the condition. // if (i case 0 when i) { // Error diff --git a/pkg/front_end/testcases/patterns/shared_errors.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/shared_errors.dart.strong.transformed.expect index 32ce3b49d4d..4b4ef69aee5 100644 --- a/pkg/front_end/testcases/patterns/shared_errors.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/shared_errors.dart.strong.transformed.expect @@ -67,16 +67,6 @@ library; // case {...}: // Error // ^ // -// pkg/front_end/testcases/patterns/shared_errors.dart:62:23: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// -// pkg/front_end/testcases/patterns/shared_errors.dart:62:31: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// // pkg/front_end/testcases/patterns/shared_errors.dart:68:21: Error: Conditions must have a static type of 'bool'. // Try changing the condition. // if (i case 0 when i) { // Error diff --git a/pkg/front_end/testcases/patterns/shared_errors.dart.weak.expect b/pkg/front_end/testcases/patterns/shared_errors.dart.weak.expect index 5218db1815b..e82c85e47bf 100644 --- a/pkg/front_end/testcases/patterns/shared_errors.dart.weak.expect +++ b/pkg/front_end/testcases/patterns/shared_errors.dart.weak.expect @@ -67,16 +67,6 @@ library; // case {...}: // Error // ^ // -// pkg/front_end/testcases/patterns/shared_errors.dart:62:23: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// -// pkg/front_end/testcases/patterns/shared_errors.dart:62:31: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// // pkg/front_end/testcases/patterns/shared_errors.dart:68:21: Error: Conditions must have a static type of 'bool'. // Try changing the condition. // if (i case 0 when i) { // Error diff --git a/pkg/front_end/testcases/patterns/shared_errors.dart.weak.modular.expect b/pkg/front_end/testcases/patterns/shared_errors.dart.weak.modular.expect index 5218db1815b..e82c85e47bf 100644 --- a/pkg/front_end/testcases/patterns/shared_errors.dart.weak.modular.expect +++ b/pkg/front_end/testcases/patterns/shared_errors.dart.weak.modular.expect @@ -67,16 +67,6 @@ library; // case {...}: // Error // ^ // -// pkg/front_end/testcases/patterns/shared_errors.dart:62:23: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// -// pkg/front_end/testcases/patterns/shared_errors.dart:62:31: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// // pkg/front_end/testcases/patterns/shared_errors.dart:68:21: Error: Conditions must have a static type of 'bool'. // Try changing the condition. // if (i case 0 when i) { // Error diff --git a/pkg/front_end/testcases/patterns/shared_errors.dart.weak.transformed.expect b/pkg/front_end/testcases/patterns/shared_errors.dart.weak.transformed.expect index 40d633d0405..6fb4890a1d5 100644 --- a/pkg/front_end/testcases/patterns/shared_errors.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/patterns/shared_errors.dart.weak.transformed.expect @@ -67,16 +67,6 @@ library; // case {...}: // Error // ^ // -// pkg/front_end/testcases/patterns/shared_errors.dart:62:23: Warning: The null-assert pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-assert pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// -// pkg/front_end/testcases/patterns/shared_errors.dart:62:31: Warning: The null-check pattern will have no effect because the matched type isn't nullable. -// Try replacing the null-check pattern with its nested pattern. -// if (list case [var a!, var b?]) { // Warnings -// ^ -// // pkg/front_end/testcases/patterns/shared_errors.dart:68:21: Error: Conditions must have a static type of 'bool'. // Try changing the condition. // if (i case 0 when i) { // Error diff --git a/pkg/front_end/testcases/rasta/static.dart.strong.expect b/pkg/front_end/testcases/rasta/static.dart.strong.expect index aea3578bbd4..e9478f2f886 100644 --- a/pkg/front_end/testcases/rasta/static.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/static.dart.strong.expect @@ -158,30 +158,6 @@ library; // use(Foo.staticField()); // ^ // -// pkg/front_end/testcases/rasta/static.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticConstant ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:76:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticConstant ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:78:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticField ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// Foo.staticFunction ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:80:13: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// use(Foo.staticFunction ??= 87); -// ^ -// import self as self; import "dart:core" as core; 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 8742fd60b90..755216c851a 100644 --- a/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect @@ -158,30 +158,6 @@ library; // use(Foo.staticField()); // ^ // -// pkg/front_end/testcases/rasta/static.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticConstant ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:76:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticConstant ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:78:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticField ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// Foo.staticFunction ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:80:13: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// use(Foo.staticFunction ??= 87); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/static.dart.weak.expect b/pkg/front_end/testcases/rasta/static.dart.weak.expect index aea3578bbd4..e9478f2f886 100644 --- a/pkg/front_end/testcases/rasta/static.dart.weak.expect +++ b/pkg/front_end/testcases/rasta/static.dart.weak.expect @@ -158,30 +158,6 @@ library; // use(Foo.staticField()); // ^ // -// pkg/front_end/testcases/rasta/static.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticConstant ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:76:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticConstant ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:78:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticField ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// Foo.staticFunction ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:80:13: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// use(Foo.staticFunction ??= 87); -// ^ -// import self as self; import "dart:core" as core; 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 aea3578bbd4..e9478f2f886 100644 --- a/pkg/front_end/testcases/rasta/static.dart.weak.modular.expect +++ b/pkg/front_end/testcases/rasta/static.dart.weak.modular.expect @@ -158,30 +158,6 @@ library; // use(Foo.staticField()); // ^ // -// pkg/front_end/testcases/rasta/static.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticConstant ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:76:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticConstant ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:78:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticField ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// Foo.staticFunction ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:80:13: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// use(Foo.staticFunction ??= 87); -// ^ -// import self as self; import "dart:core" as core; 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 8742fd60b90..755216c851a 100644 --- a/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/rasta/static.dart.weak.transformed.expect @@ -158,30 +158,6 @@ library; // use(Foo.staticField()); // ^ // -// pkg/front_end/testcases/rasta/static.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticConstant ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:76:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticConstant ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// Foo.staticField ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:78:13: Warning: Operand of null-aware operation '??=' has type 'int' which excludes null. -// use(Foo.staticField ??= 87); -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// Foo.staticFunction ??= 87; -// ^ -// -// pkg/front_end/testcases/rasta/static.dart:80:13: Warning: Operand of null-aware operation '??=' has type 'dynamic Function()' which excludes null. -// use(Foo.staticFunction ??= 87); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.expect b/pkg/front_end/testcases/rasta/super.dart.strong.expect index 7e7f43d4295..a4e9c910158 100644 --- a/pkg/front_end/testcases/rasta/super.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/super.dart.strong.expect @@ -273,22 +273,6 @@ library; // use(super.n(87)); // ^ // -// pkg/front_end/testcases/rasta/super.dart:197:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.m ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:198:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.m ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:199:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.n ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:200:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.n ??= 42); -// ^ -// // pkg/front_end/testcases/rasta/super.dart:224:13: Error: The operator '+' isn't defined for the class 'void Function()'. // Try correcting the operator to an existing operator, or defining a '+' operator. // super.n += 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 bf18a462845..3f5df9fe9b7 100644 --- a/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect @@ -273,22 +273,6 @@ library; // use(super.n(87)); // ^ // -// pkg/front_end/testcases/rasta/super.dart:197:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.m ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:198:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.m ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:199:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.n ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:200:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.n ??= 42); -// ^ -// // pkg/front_end/testcases/rasta/super.dart:224:13: Error: The operator '+' isn't defined for the class 'void Function()'. // Try correcting the operator to an existing operator, or defining a '+' operator. // super.n += 42; diff --git a/pkg/front_end/testcases/rasta/super.dart.weak.expect b/pkg/front_end/testcases/rasta/super.dart.weak.expect index 7e7f43d4295..a4e9c910158 100644 --- a/pkg/front_end/testcases/rasta/super.dart.weak.expect +++ b/pkg/front_end/testcases/rasta/super.dart.weak.expect @@ -273,22 +273,6 @@ library; // use(super.n(87)); // ^ // -// pkg/front_end/testcases/rasta/super.dart:197:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.m ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:198:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.m ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:199:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.n ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:200:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.n ??= 42); -// ^ -// // pkg/front_end/testcases/rasta/super.dart:224:13: Error: The operator '+' isn't defined for the class 'void Function()'. // Try correcting the operator to an existing operator, or defining a '+' operator. // super.n += 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 7e7f43d4295..a4e9c910158 100644 --- a/pkg/front_end/testcases/rasta/super.dart.weak.modular.expect +++ b/pkg/front_end/testcases/rasta/super.dart.weak.modular.expect @@ -273,22 +273,6 @@ library; // use(super.n(87)); // ^ // -// pkg/front_end/testcases/rasta/super.dart:197:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.m ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:198:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.m ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:199:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.n ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:200:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.n ??= 42); -// ^ -// // pkg/front_end/testcases/rasta/super.dart:224:13: Error: The operator '+' isn't defined for the class 'void Function()'. // Try correcting the operator to an existing operator, or defining a '+' operator. // super.n += 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 bf18a462845..3f5df9fe9b7 100644 --- a/pkg/front_end/testcases/rasta/super.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/rasta/super.dart.weak.transformed.expect @@ -273,22 +273,6 @@ library; // use(super.n(87)); // ^ // -// pkg/front_end/testcases/rasta/super.dart:197:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.m ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:198:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.m ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:199:11: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// super.n ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/super.dart:200:15: Warning: Operand of null-aware operation '??=' has type 'void Function()' which excludes null. -// use(super.n ??= 42); -// ^ -// // pkg/front_end/testcases/rasta/super.dart:224:13: Error: The operator '+' isn't defined for the class 'void Function()'. // Try correcting the operator to an existing operator, or defining a '+' operator. // super.n += 42; diff --git a/pkg/front_end/testcases/rasta/type_literals.dart.strong.expect b/pkg/front_end/testcases/rasta/type_literals.dart.strong.expect index 9f8b65f6ceb..591fdf026b5 100644 --- a/pkg/front_end/testcases/rasta/type_literals.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/type_literals.dart.strong.expect @@ -282,46 +282,6 @@ library; // use(Func -= 42); // ^^^^ // -// pkg/front_end/testcases/rasta/type_literals.dart:74:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// C ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(C ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:76:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// dynamic ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(dynamic ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:78:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// T ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(T ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:80:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Func ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:81:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(Func ??= 42); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/type_literals.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/type_literals.dart.strong.transformed.expect index 4c41321a39e..ff75b154ff8 100644 --- a/pkg/front_end/testcases/rasta/type_literals.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/type_literals.dart.strong.transformed.expect @@ -282,46 +282,6 @@ library; // use(Func -= 42); // ^^^^ // -// pkg/front_end/testcases/rasta/type_literals.dart:74:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// C ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(C ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:76:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// dynamic ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(dynamic ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:78:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// T ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(T ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:80:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Func ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:81:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(Func ??= 42); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/type_literals.dart.weak.expect b/pkg/front_end/testcases/rasta/type_literals.dart.weak.expect index c15c07a735c..0b8e390410b 100644 --- a/pkg/front_end/testcases/rasta/type_literals.dart.weak.expect +++ b/pkg/front_end/testcases/rasta/type_literals.dart.weak.expect @@ -282,46 +282,6 @@ library; // use(Func -= 42); // ^^^^ // -// pkg/front_end/testcases/rasta/type_literals.dart:74:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// C ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(C ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:76:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// dynamic ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(dynamic ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:78:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// T ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(T ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:80:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Func ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:81:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(Func ??= 42); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/type_literals.dart.weak.modular.expect b/pkg/front_end/testcases/rasta/type_literals.dart.weak.modular.expect index c15c07a735c..0b8e390410b 100644 --- a/pkg/front_end/testcases/rasta/type_literals.dart.weak.modular.expect +++ b/pkg/front_end/testcases/rasta/type_literals.dart.weak.modular.expect @@ -282,46 +282,6 @@ library; // use(Func -= 42); // ^^^^ // -// pkg/front_end/testcases/rasta/type_literals.dart:74:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// C ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(C ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:76:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// dynamic ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(dynamic ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:78:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// T ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(T ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:80:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Func ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:81:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(Func ??= 42); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/type_literals.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/type_literals.dart.weak.transformed.expect index d436154d150..8c2a7f54e11 100644 --- a/pkg/front_end/testcases/rasta/type_literals.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/rasta/type_literals.dart.weak.transformed.expect @@ -282,46 +282,6 @@ library; // use(Func -= 42); // ^^^^ // -// pkg/front_end/testcases/rasta/type_literals.dart:74:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// C ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:75:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(C ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:76:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// dynamic ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:77:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(dynamic ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:78:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// T ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:79:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(T ??= 42); -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:80:5: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Func ??= 42; -// ^ -// -// pkg/front_end/testcases/rasta/type_literals.dart:81:9: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// use(Func ??= 42); -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/typedef.dart.strong.expect b/pkg/front_end/testcases/rasta/typedef.dart.strong.expect index 38f210228b4..674068b72f7 100644 --- a/pkg/front_end/testcases/rasta/typedef.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/typedef.dart.strong.expect @@ -14,11 +14,6 @@ library; // Foo(); // ^^^ // -// pkg/front_end/testcases/rasta/typedef.dart:10:3: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Foo ??= null; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/typedef.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/typedef.dart.strong.transformed.expect index 01639f66c58..d56f4471f2b 100644 --- a/pkg/front_end/testcases/rasta/typedef.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/typedef.dart.strong.transformed.expect @@ -14,11 +14,6 @@ library; // Foo(); // ^^^ // -// pkg/front_end/testcases/rasta/typedef.dart:10:3: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Foo ??= null; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/typedef.dart.weak.expect b/pkg/front_end/testcases/rasta/typedef.dart.weak.expect index 5574d834a21..d449e5e5da4 100644 --- a/pkg/front_end/testcases/rasta/typedef.dart.weak.expect +++ b/pkg/front_end/testcases/rasta/typedef.dart.weak.expect @@ -14,11 +14,6 @@ library; // Foo(); // ^^^ // -// pkg/front_end/testcases/rasta/typedef.dart:10:3: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Foo ??= null; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/typedef.dart.weak.modular.expect b/pkg/front_end/testcases/rasta/typedef.dart.weak.modular.expect index 5574d834a21..d449e5e5da4 100644 --- a/pkg/front_end/testcases/rasta/typedef.dart.weak.modular.expect +++ b/pkg/front_end/testcases/rasta/typedef.dart.weak.modular.expect @@ -14,11 +14,6 @@ library; // Foo(); // ^^^ // -// pkg/front_end/testcases/rasta/typedef.dart:10:3: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Foo ??= null; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/rasta/typedef.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/typedef.dart.weak.transformed.expect index 67615348bdf..a293d61f71f 100644 --- a/pkg/front_end/testcases/rasta/typedef.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/rasta/typedef.dart.weak.transformed.expect @@ -14,11 +14,6 @@ library; // Foo(); // ^^^ // -// pkg/front_end/testcases/rasta/typedef.dart:10:3: Warning: Operand of null-aware operation '??=' has type 'Type' which excludes null. -// - 'Type' is from 'dart:core'. -// Foo ??= null; -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access.dart.strong.expect b/pkg/front_end/testcases/records/nullable_access.dart.strong.expect index d8a8c1fabe9..e8aef909db6 100644 --- a/pkg/front_end/testcases/records/nullable_access.dart.strong.expect +++ b/pkg/front_end/testcases/records/nullable_access.dart.strong.expect @@ -12,14 +12,6 @@ library; // var l1 = r.a; // Error. // ^ // -// pkg/front_end/testcases/records/nullable_access.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access.dart.strong.transformed.expect b/pkg/front_end/testcases/records/nullable_access.dart.strong.transformed.expect index d8a8c1fabe9..e8aef909db6 100644 --- a/pkg/front_end/testcases/records/nullable_access.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/records/nullable_access.dart.strong.transformed.expect @@ -12,14 +12,6 @@ library; // var l1 = r.a; // Error. // ^ // -// pkg/front_end/testcases/records/nullable_access.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access.dart.weak.expect b/pkg/front_end/testcases/records/nullable_access.dart.weak.expect index d8a8c1fabe9..e8aef909db6 100644 --- a/pkg/front_end/testcases/records/nullable_access.dart.weak.expect +++ b/pkg/front_end/testcases/records/nullable_access.dart.weak.expect @@ -12,14 +12,6 @@ library; // var l1 = r.a; // Error. // ^ // -// pkg/front_end/testcases/records/nullable_access.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access.dart.weak.modular.expect b/pkg/front_end/testcases/records/nullable_access.dart.weak.modular.expect index d8a8c1fabe9..e8aef909db6 100644 --- a/pkg/front_end/testcases/records/nullable_access.dart.weak.modular.expect +++ b/pkg/front_end/testcases/records/nullable_access.dart.weak.modular.expect @@ -12,14 +12,6 @@ library; // var l1 = r.a; // Error. // ^ // -// pkg/front_end/testcases/records/nullable_access.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access.dart.weak.transformed.expect b/pkg/front_end/testcases/records/nullable_access.dart.weak.transformed.expect index d8a8c1fabe9..e8aef909db6 100644 --- a/pkg/front_end/testcases/records/nullable_access.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/records/nullable_access.dart.weak.transformed.expect @@ -12,14 +12,6 @@ library; // var l1 = r.a; // Error. // ^ // -// pkg/front_end/testcases/records/nullable_access.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access_extension.dart.strong.expect b/pkg/front_end/testcases/records/nullable_access_extension.dart.strong.expect index 6ea262c508f..a6ec763cc5c 100644 --- a/pkg/front_end/testcases/records/nullable_access_extension.dart.strong.expect +++ b/pkg/front_end/testcases/records/nullable_access_extension.dart.strong.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access_extension.dart.strong.transformed.expect b/pkg/front_end/testcases/records/nullable_access_extension.dart.strong.transformed.expect index 6ea262c508f..a6ec763cc5c 100644 --- a/pkg/front_end/testcases/records/nullable_access_extension.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/records/nullable_access_extension.dart.strong.transformed.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.expect b/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.expect index 6ea262c508f..a6ec763cc5c 100644 --- a/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.expect +++ b/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.modular.expect b/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.modular.expect index 6ea262c508f..a6ec763cc5c 100644 --- a/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.modular.expect +++ b/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.modular.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.transformed.expect b/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.transformed.expect index 6ea262c508f..a6ec763cc5c 100644 --- a/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/records/nullable_access_extension.dart.weak.transformed.expect @@ -1,15 +1,4 @@ library; -// -// Problems in library: -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:13:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l6 = r?.$1; // Warning. -// ^ -// -// pkg/front_end/testcases/records/nullable_access_extension.dart:14:14: Warning: Operand of null-aware operation '?.' has type '(int, {String a})' which excludes null. -// var l7 = r?.a; // Warning. -// ^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.strong.expect b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.strong.expect index f5a9abf9830..2ef95b796e0 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.strong.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.strong.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1()]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.strong.transformed.expect b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.strong.transformed.expect index 6912229cb1a..45d1f7044da 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.strong.transformed.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1()]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.expect index f5a9abf9830..2ef95b796e0 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1()]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.modular.expect b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.modular.expect index f5a9abf9830..2ef95b796e0 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.modular.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1()]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.transformed.expect index 6912229cb1a..45d1f7044da 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart.weak.transformed.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_generic_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1()]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.strong.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.strong.expect index faa5e5cb401..4c1768d2ff2 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.strong.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.strong.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.strong.transformed.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.strong.transformed.expect index 7e5b8acc2b3..af5235a65b9 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.strong.transformed.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.expect index faa5e5cb401..4c1768d2ff2 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.modular.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.modular.expect index faa5e5cb401..4c1768d2ff2 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.modular.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.modular.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.transformed.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.transformed.expect index 7e5b8acc2b3..af5235a65b9 100644 --- a/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart.weak.transformed.expect @@ -1,12 +1,4 @@ library test; -// -// Problems in library: -// -// pkg/front_end/testcases/runtime_checks/contravariant_getter_return_null_aware2.dart:13:13: Warning: The receiver 'this' cannot be null. -// Try replacing '?.' with '.' -// return [this?.f1]; -// ^^^^ -// import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status index 08565dca989..4b937d47374 100644 --- a/pkg/front_end/testcases/strong.status +++ b/pkg/front_end/testcases/strong.status @@ -71,6 +71,7 @@ patterns/private_names_in_object_patterns: semiFuzzFailureOnForceRebuildBodies # records/issue51940: semiFuzzFailureOnForceRebuildBodies # can't split because of sealed class. regress/issue_39682: semiFuzzFailureOnForceRebuildBodies # has private method dart2wasm/inference_update_2/issue52452: semiFuzzFailureOnForceRebuildBodies # private fields in class. +records/nullable_access_extension: semiFuzzFailureOnForceRebuildBodies # unnamed extension # FUZZ FRAMEWORK FAILURES class_modifiers/invalid_enum_modifiers: SemiFuzzFailure # the invalid modifiers disappear diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status index 21fefe0627b..7ff002b7339 100644 --- a/pkg/front_end/testcases/weak.status +++ b/pkg/front_end/testcases/weak.status @@ -55,6 +55,7 @@ patterns/extension_tear_off: semiFuzzFailureOnForceRebuildBodies # private exten patterns/pattern_matching: semiFuzzFailureOnForceRebuildBodies # can't split because of sealed class. inference_update_2/call_invocation_with_hoisting: semiFuzzFailureOnForceRebuildBodies # privacy inference_update_2/cascaded_field_promotion: semiFuzzFailureOnForceRebuildBodies # privacy +records/nullable_access_extension: semiFuzzFailureOnForceRebuildBodies # unnamed extension # FUZZ FRAMEWORK FAILURES class_modifiers/invalid_enum_modifiers: SemiFuzzFailure # the invalid modifiers disappear diff --git a/pkg/frontend_server/test/frontend_server_test.dart b/pkg/frontend_server/test/frontend_server_test.dart index 6627b13fe62..b2c805d8bb9 100644 --- a/pkg/frontend_server/test/frontend_server_test.dart +++ b/pkg/frontend_server/test/frontend_server_test.dart @@ -3057,8 +3057,12 @@ e() { Future runTest({bool hideWarnings = true}) async { File file = new File('${tempDir.path}/foo.dart')..createSync(); file.writeAsStringSync(""" +import 'dart:js_interop'; main() {} -method(int i) => i?.isEven; +@JSExport('Foo') +class Class { + void method() {} +} """); File packageConfig = new File('${tempDir.path}/.dart_tool/package_config.json') @@ -3090,11 +3094,12 @@ method(int i) => i?.isEven; file.path, ]; StringBuffer output = new StringBuffer(); - expect(await starter(args, output: output), 0); + int exitCode = await starter(args, output: output); String result = output.toString(); + expect(exitCode, 0); Matcher matcher = - contains("Warning: Operand of null-aware operation '?.' " - "has type 'int' which excludes null."); + contains("Warning: The value in the `@JSExport` annotation on the " + "class or mixin 'Class' will be ignored."); if (hideWarnings) { matcher = isNot(matcher); } diff --git a/tests/language/explicit_type_instantiation_parsing_test.dart b/tests/language/explicit_type_instantiation_parsing_test.dart index 47b58d14cb9..487bd1d905f 100644 --- a/tests/language/explicit_type_instantiation_parsing_test.dart +++ b/tests/language/explicit_type_instantiation_parsing_test.dart @@ -170,8 +170,8 @@ void main() { // Parsed as instantiation, can't access statics on instantiated type literal. expect1(Z.instance); // ^^^^^^^^ - // [cfe] Cannot access static member on an instantiated generic class. // [analyzer] unspecified + // [cfe] Cannot access static member on an instantiated generic class. // Not valid inside `<..>`, so always parsed as operators. @@ -205,8 +205,6 @@ void main() { expect1((Z) - 2); expect1((Z)[1]); expect1((Z)![1].asBool); // ignore: unnecessary_non_null_assertion - // ^ - // [cfe] Operand of null-aware operation '!' has type 'Type' which excludes null. // Works if the type argument would end in `>>` or `>>>` too. expect3(Z < X, Z < X, X >> X); @@ -233,64 +231,64 @@ void main() { // Cannot parse as operators since grammar doesn't allow chaining. X<2>(2); // ^ - // [cfe] A comparison expression can't be an operand of another comparison expression. // [analyzer] SYNTACTIC_ERROR.EQUALITY_CANNOT_BE_EQUALITY_OPERAND + // [cfe] A comparison expression can't be an operand of another comparison expression. X<2>; - // ^ - // [cfe] Expected an identifier, but got ';'. - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER // ^ - // [cfe] A comparison expression can't be an operand of another comparison expression. // [analyzer] SYNTACTIC_ERROR.EQUALITY_CANNOT_BE_EQUALITY_OPERAND + // [cfe] A comparison expression can't be an operand of another comparison expression. + // ^ + // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER + // [cfe] Expected an identifier, but got ';'. X<2>.instance; // Not type argument. - // ^ - // [cfe] Expected an identifier, but got '.'. - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER // ^ - // [cfe] A comparison expression can't be an operand of another comparison expression. // [analyzer] SYNTACTIC_ERROR.EQUALITY_CANNOT_BE_EQUALITY_OPERAND + // [cfe] A comparison expression can't be an operand of another comparison expression. + // ^ + // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER + // [cfe] Expected an identifier, but got '.'. X<2>.any; - // ^ - // [cfe] Expected an identifier, but got '.'. - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER // ^ - // [cfe] A comparison expression can't be an operand of another comparison expression. // [analyzer] SYNTACTIC_ERROR.EQUALITY_CANNOT_BE_EQUALITY_OPERAND + // [cfe] A comparison expression can't be an operand of another comparison expression. + // ^ + // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER + // [cfe] Expected an identifier, but got '.'. // This would be invalid even if `X` had an `any` member. See next. X.any; // Invalid, Class does not have any static `any` member. // ^^^ - // [cfe] Member not found: 'any'. // [analyzer] unspecified + // [cfe] Member not found: 'any'. X.instance; // Does have static `instance` member, can't access this way. // ^^^^^^^^ - // [cfe] Cannot access static member on an instantiated generic class. // [analyzer] unspecified + // [cfe] Cannot access static member on an instantiated generic class. // Parse error. X2; // ^ - // [cfe] A comparison expression can't be an operand of another comparison expression. // [analyzer] SYNTACTIC_ERROR.EQUALITY_CANNOT_BE_EQUALITY_OPERAND + // [cfe] A comparison expression can't be an operand of another comparison expression. // Doesn't parse as operators, would be valid if type arguments. // The following `-` forces operators, but those can't parse like this. X-1; // ^ - // [cfe] A comparison expression can't be an operand of another comparison expression. // [analyzer] SYNTACTIC_ERROR.EQUALITY_CANNOT_BE_EQUALITY_OPERAND + // [cfe] A comparison expression can't be an operand of another comparison expression. // Parsed as operators on function instantiation too (parsing doesn't know.) f1 - 1; // ^ - // [cfe] A comparison expression can't be an operand of another comparison expression. // [analyzer] SYNTACTIC_ERROR.EQUALITY_CANNOT_BE_EQUALITY_OPERAND + // [cfe] A comparison expression can't be an operand of another comparison expression. // Parsed as a generic invocation. Valid because of the `call` extension // method on `Object?`. diff --git a/tests/language/if_null/assignment_behavior_runtime_26_test.dart b/tests/language/if_null/assignment_behavior_runtime_26_test.dart index 6fe8e95f04b..d10652152a5 100644 --- a/tests/language/if_null/assignment_behavior_runtime_26_test.dart +++ b/tests/language/if_null/assignment_behavior_runtime_26_test.dart @@ -204,8 +204,6 @@ main() { yGetValue = 1; check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR diff --git a/tests/language/if_null/assignment_behavior_runtime_27_test.dart b/tests/language/if_null/assignment_behavior_runtime_27_test.dart index d932daa4ee5..56632f36559 100644 --- a/tests/language/if_null/assignment_behavior_runtime_27_test.dart +++ b/tests/language/if_null/assignment_behavior_runtime_27_test.dart @@ -206,8 +206,6 @@ main() { yGetValue = 1; check(1, () => h.C?.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR } diff --git a/tests/language/if_null/assignment_behavior_test.dart b/tests/language/if_null/assignment_behavior_test.dart index a0d6f117b90..9bd2a0e48c1 100644 --- a/tests/language/if_null/assignment_behavior_test.dart +++ b/tests/language/if_null/assignment_behavior_test.dart @@ -125,7 +125,6 @@ class C { finalOne ??= null; // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL -// [cfe] Operand of null-aware operation '??=' has type 'int' which excludes null. // [cfe] The setter 'finalOne' isn't defined for the class 'C'. // ^^^^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION @@ -173,8 +172,6 @@ main() { { var l = 1; check(1, () => l ??= bad(), []); - // ^ - // [cfe] Operand of null-aware operation '??=' has type 'int' which excludes null. // ^^^^^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION } @@ -190,7 +187,6 @@ main() { // ^ // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL // [cfe] Can't assign to the final variable 'l'. -// [cfe] Operand of null-aware operation '??=' has type 'int' which excludes null. // ^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION @@ -199,7 +195,6 @@ main() { //^ // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE // [cfe] Can't assign to a type literal. -// [cfe] Operand of null-aware operation '??=' has type 'Type' which excludes null. h ??= null; //^ // [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT @@ -259,8 +254,6 @@ main() { check(1, () => C?.x ??= bad(), ['C.x']); // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] The class 'C' cannot be null. h.C.xgetValue = 1; // ^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER @@ -273,12 +266,8 @@ main() { check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']); // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] The class 'C' cannot be null. yGetValue = 1; check(1, () => h.C?.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] The class 'C' cannot be null. } diff --git a/tests/language/if_null/precedence_test.dart b/tests/language/if_null/precedence_test.dart index 3a198d1e000..152bb365931 100644 --- a/tests/language/if_null/precedence_test.dart +++ b/tests/language/if_null/precedence_test.dart @@ -41,8 +41,6 @@ main() { // type warning if b doesn't have type bool. An incorrect parse of // "a || (b ?? c)" would allow b to have any type provided that c is bool. falsity || 1 ?? true; -// ^ -// [cfe] Operand of null-aware operation '??' has type 'bool' which excludes null. // ^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. @@ -52,8 +50,6 @@ main() { // An incorrect parse of "a || (b ?? c)" would result in no checked-mode // error. Expect.throwsAssertionError(() => false || null ?? true); - // ^ - // [cfe] Operand of null-aware operation '??' has type 'bool' which excludes null. // ^^^^ // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND // [cfe] The value 'null' can't be assigned to a variable of type 'bool' because 'bool' is not nullable. diff --git a/tests/language/inference_update_2/cascaded_field_promotion_unnecessary_null_aware_error_test.dart b/tests/language/inference_update_2/cascaded_field_promotion_unnecessary_null_aware_error_test.dart index 36cc842934d..89d12828dea 100644 --- a/tests/language/inference_update_2/cascaded_field_promotion_unnecessary_null_aware_error_test.dart +++ b/tests/language/inference_update_2/cascaded_field_promotion_unnecessary_null_aware_error_test.dart @@ -22,8 +22,6 @@ void cascadedAccessReceivesTheBenefitOfPromotion(C c) { c._field as int; c._field.expectStaticType>(); c -//^ -// [cfe] Operand of null-aware operation '?..' has type 'C' which excludes null. ?.._field.expectStaticType>() // ^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -39,8 +37,6 @@ void fieldAccessOnACascadeExpressionRetainsPromotion(C c) { c._field as int; c._field.expectStaticType>(); (c?..f())._field.expectStaticType>(); -// ^ -// [cfe] Operand of null-aware operation '?..' has type 'C' which excludes null. // ^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -51,8 +47,6 @@ void fieldAccessOnACascadeExpressionRetainsPromotion(C c) { void fieldsPromotableWithinCascade(C c) { // Within a cascade, a field can be promoted using `!`. c -//^ -// [cfe] Operand of null-aware operation '?..' has type 'C' which excludes null. ?.._field.expectStaticType>() // ^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -64,8 +58,6 @@ void fieldsPromotableWithinCascade(C c) { // preserve the promotion, but it's extra work to do so, and it's not clear // that there would be enough user benefit to justify the work). c?._field.expectStaticType>(); -//^ -// [cfe] Operand of null-aware operation '?.' has type 'C' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR } @@ -75,8 +67,6 @@ void ephemeralValueFieldsArePromotable(C Function() getC) { // variable) can still be promoted in one cascade section, and the results of // the promotion can be seen in later cascade sections. getC() - //^ - // [cfe] Operand of null-aware operation '?..' has type 'C' which excludes null. ?.._field.expectStaticType>() // ^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -97,8 +87,6 @@ void writeCapturedValueFieldsArePromotable(C c) { } c -//^ -// [cfe] Operand of null-aware operation '?..' has type 'C' which excludes null. ?.._field.expectStaticType>() // ^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -117,8 +105,6 @@ void writeDefeatsLaterAccessesButNotCascadeTarget(C c) { c._field as C; c._field.expectStaticType>(); c -//^ -// [cfe] Operand of null-aware operation '?..' has type 'C' which excludes null. ?.._field.f([c = C(C()), c._field.expectStaticType>()]) // ^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -131,8 +117,6 @@ void cascadedInvocationsPermitted(C c) { c._field as int Function(); c._field.expectStaticType>(); c?.._field().expectStaticType>(); -//^ -// [cfe] Operand of null-aware operation '?..' has type 'C' which excludes null. } main() { diff --git a/tests/language/nnbd/definite_assignment/read_error_test.dart b/tests/language/nnbd/definite_assignment/read_error_test.dart index 02146b34a30..aae4545ba4c 100644 --- a/tests/language/nnbd/definite_assignment/read_error_test.dart +++ b/tests/language/nnbd/definite_assignment/read_error_test.dart @@ -34,7 +34,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } // Error: not nullable. @@ -43,7 +44,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Non-nullable variable 'x' must be assigned before it can be used. } // Ok: non-final and nullably typed. @@ -58,7 +60,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } // Error: final. @@ -67,7 +70,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } // Error: final and not nullable. @@ -76,7 +80,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } // Error: late @@ -85,7 +90,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Late variable 'x' without initializer is definitely unassigned. } // Error: late and not nullable @@ -94,7 +100,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Late variable 'x' without initializer is definitely unassigned. } // Error: late @@ -103,7 +110,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Late variable 'x' without initializer is definitely unassigned. } // Error: late and not nullable @@ -112,7 +120,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Late variable 'x' without initializer is definitely unassigned. } // Error: late and final @@ -121,7 +130,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Late variable 'x' without initializer is definitely unassigned. } // Error: late and final and not nullable @@ -130,7 +140,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Late variable 'x' without initializer is definitely unassigned. } // Error: late and final @@ -139,7 +150,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Late variable 'x' without initializer is definitely unassigned. } // Error: late and final and not nullable @@ -148,7 +160,8 @@ void testDefinitelyUnassignedReads() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Late variable 'x' without initializer is definitely unassigned. } } @@ -179,7 +192,8 @@ void testPotentiallyUnassignedReads(bool b, T t) { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } // Error: not nullable. @@ -192,7 +206,8 @@ void testPotentiallyUnassignedReads(bool b, T t) { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Non-nullable variable 'x' must be assigned before it can be used. } // Ok: non-final and nullable. @@ -215,7 +230,8 @@ void testPotentiallyUnassignedReads(bool b, T t) { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } // Error: final. @@ -228,7 +244,8 @@ void testPotentiallyUnassignedReads(bool b, T t) { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } // Error: final and not nullable. @@ -241,7 +258,8 @@ void testPotentiallyUnassignedReads(bool b, T t) { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } // Ok: late. @@ -445,9 +463,10 @@ void testDefinitelyUnassignedReadForms() { { final dynamic x; x; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -455,63 +474,71 @@ void testDefinitelyUnassignedReadForms() { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } { final dynamic x; x(use); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x.foo; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x.foo(); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x.foo = 3; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x?.foo; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x..foo; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x[0]; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -519,31 +546,35 @@ void testDefinitelyUnassignedReadForms() { ([3])[x]; // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } { final dynamic x; (x as int); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; (x is int); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; (x == null); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -551,7 +582,8 @@ void testDefinitelyUnassignedReadForms() { (null == x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } { @@ -559,71 +591,80 @@ void testDefinitelyUnassignedReadForms() { (3 == x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } { final dynamic x; (x == 3); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; (x == 3); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x++; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; ++x; + //^ + // [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; -x; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x += 3; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x ??= 3; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { final dynamic x; x ?? 3; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -631,7 +672,8 @@ void testDefinitelyUnassignedReadForms() { 3 ?? x; // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } } @@ -650,9 +692,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -663,7 +706,8 @@ void testPotentiallyUnassignedReadForms(bool b) { use(x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } { @@ -672,9 +716,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x(use); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -683,9 +728,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x.foo; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -694,9 +740,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x.foo(); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -705,9 +752,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x.foo = 3; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -716,9 +764,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x?.foo; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -727,9 +776,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x..foo; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -738,9 +788,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x[0]; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -751,7 +802,8 @@ void testPotentiallyUnassignedReadForms(bool b) { ([3])[x]; // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } { @@ -760,9 +812,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } (x as int); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -771,9 +824,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } (x is int); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -782,9 +836,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } (x == null); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -795,7 +850,8 @@ void testPotentiallyUnassignedReadForms(bool b) { (null == x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } { @@ -806,7 +862,8 @@ void testPotentiallyUnassignedReadForms(bool b) { (3 == x); // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } { @@ -815,9 +872,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } (x == 3); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -826,9 +884,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } (x == 3); +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -837,9 +896,11 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x++; +// ^ +// [cfe] Final variable 'x' might already be assigned at this point. +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -848,9 +909,11 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } ++x; + //^ + // [cfe] Final variable 'x' might already be assigned at this point. + // [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -859,9 +922,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } -x; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -870,9 +934,11 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x += 3; +// ^ +// [cfe] Final variable 'x' might already be assigned at this point. +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -881,9 +947,11 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x ??= 3; +// ^ +// [cfe] Final variable 'x' might already be assigned at this point. +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -892,9 +960,10 @@ void testPotentiallyUnassignedReadForms(bool b) { x = 3; } x ?? 3; +// ^ +// [cfe] Final variable 'x' must be assigned before it can be used. // ^ // [analyzer] unspecified - // [cfe] unspecified } { @@ -905,7 +974,8 @@ void testPotentiallyUnassignedReadForms(bool b) { 3 ?? x; // ^ // [analyzer] unspecified - // [cfe] unspecified + // ^ + // [cfe] Final variable 'x' must be assigned before it can be used. } } @@ -1070,8 +1140,6 @@ void testDefinitelyAssignedReadForms() { final dynamic x; x = 3; 3 ?? x; -// ^ -// [cfe] Operand of null-aware operation '??' has type 'int' which excludes null. // ^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION } diff --git a/tests/language/nnbd/operator_type_test.dart b/tests/language/nnbd/operator_type_test.dart index fe677bd8ebe..aaacaad6660 100644 --- a/tests/language/nnbd/operator_type_test.dart +++ b/tests/language/nnbd/operator_type_test.dart @@ -267,38 +267,31 @@ dynamic nullable() { _ = nn ?? 1; // ^^ // [analyzer] unspecified - // [cfe] Operand of null-aware operation '??' has type 'int' which excludes null. _ = nn ??= 1; // ^^ // [analyzer] unspecified - // [cfe] Operand of null-aware operation '??=' has type 'int' which excludes null. _ = nn?.toRadixString(16); // ^^ // [analyzer] unspecified - // [cfe] Operand of null-aware operation '?.' has type 'int' which excludes null. _ = nn?..toRadixString(16); // ^^ // [analyzer] unspecified - // [cfe] Operand of null-aware operation '?..' has type 'int' which excludes null. _ = nn!; // ^^ // [analyzer] unspecified - // [cfe] Operand of null-aware operation '!' has type 'int' which excludes null. List nni = [1]; _ = [...?nni]; // ^^^ // [analyzer] unspecified - // [cfe] Operand of null-aware operation '...?' has type 'List' which excludes null. _ = nni?[0]; // ^^^ // [analyzer] unspecified - // [cfe] Operand of null-aware operation '?.' has type 'List' which excludes null. return _; } diff --git a/tests/language/nnbd/resolution/question_question_lub_test.dart b/tests/language/nnbd/resolution/question_question_lub_test.dart index 0f586265095..8d36ecf6f06 100644 --- a/tests/language/nnbd/resolution/question_question_lub_test.dart +++ b/tests/language/nnbd/resolution/question_question_lub_test.dart @@ -18,16 +18,12 @@ void f1( // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] Operator '+' cannot be called on 'int?' because it is potentially null. (nonNullInt ?? nullableInt) + 1; -// ^ -// [cfe] Operand of null-aware operation '??' has type 'int' which excludes null. // ^^^^^^^^^^^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION // ^ // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE // [cfe] Operator '+' cannot be called on 'int?' because it is potentially null. (nonNullInt ?? nonNullInt) + 1; -// ^ -// [cfe] Operand of null-aware operation '??' has type 'int' which excludes null. // ^^^^^^^^^^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION } diff --git a/tests/language/nnbd/syntax/nullable_type_ambiguous_test.dart b/tests/language/nnbd/syntax/nullable_type_ambiguous_test.dart index b00c18d92e6..006bc4f3826 100644 --- a/tests/language/nnbd/syntax/nullable_type_ambiguous_test.dart +++ b/tests/language/nnbd/syntax/nullable_type_ambiguous_test.dart @@ -36,8 +36,6 @@ main() { // { a is bool ?? true : 3 } is parsed as a map literal { ((a is bool) ?? true) : 3 }. a = true; var x5 = {a is bool ?? true : 3}; - // ^ - // [cfe] Operand of null-aware operation '??' has type 'bool' which excludes null. // ^^^^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION Expect.type>(x5); diff --git a/tests/language/null_aware/access_runtime_test.dart b/tests/language/null_aware/access_runtime_test.dart index 49e606ee4ba..4149a306ec9 100644 --- a/tests/language/null_aware/access_runtime_test.dart +++ b/tests/language/null_aware/access_runtime_test.dart @@ -28,15 +28,11 @@ main() { // C?.id is equivalent to C.id. C.staticInt = 1; Expect.equals(1, C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -49,8 +45,6 @@ main() { { C.staticInt = 1; int? i = C?.staticInt; - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(1, i); @@ -59,8 +53,6 @@ main() { { h.C.staticInt = 1; int? i = h.C?.staticInt; - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(1, i); diff --git a/tests/language/null_aware/access_test.dart b/tests/language/null_aware/access_test.dart index 61b42078e55..ec0708e413c 100644 --- a/tests/language/null_aware/access_test.dart +++ b/tests/language/null_aware/access_test.dart @@ -26,8 +26,6 @@ main() { // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). Expect.equals(null, nullC()?.v); Expect.equals(1, new C(1)?.v); - // ^ - // [cfe] Operand of null-aware operation '?.' has type 'C' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -37,14 +35,10 @@ main() { Expect.equals(1, C?.staticInt); // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] The class 'C' cannot be null. } { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR } @@ -52,8 +46,6 @@ main() { // The static type of e1?.d is the static type of e1.id. { int? i = new C(1)?.v; - // ^ - // [cfe] Operand of null-aware operation '?.' has type 'C' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(1, i); @@ -64,7 +56,6 @@ main() { // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^ // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'. - // [cfe] Operand of null-aware operation '?.' has type 'C' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(null, s); @@ -72,8 +63,6 @@ main() { { C.staticInt = 1; int? i = C?.staticInt; - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(1, i); @@ -81,8 +70,6 @@ main() { { h.C.staticInt = 1; int? i = h.C?.staticInt; - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(1, i); @@ -92,11 +79,10 @@ main() { String? s = C?.staticInt; // ^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] The class 'C' cannot be null. - // ^ - // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR + // ^ + // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'. Expect.equals(null, s); } { @@ -106,8 +92,6 @@ main() { // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] The class 'C' cannot be null. // ^ // [cfe] A value of type 'int?' can't be assigned to a variable of type 'String?'. Expect.equals(null, s); diff --git a/tests/language/null_aware/assignment_runtime_test.dart b/tests/language/null_aware/assignment_runtime_test.dart index 69f125876ee..2f82ee129b1 100644 --- a/tests/language/null_aware/assignment_runtime_test.dart +++ b/tests/language/null_aware/assignment_runtime_test.dart @@ -52,16 +52,12 @@ main() { // C?.v = e2 is equivalent to C.v = e2. C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, C.staticInt); h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, h.C.staticInt); @@ -78,8 +74,6 @@ main() { D.staticE = new E(); G g = new G(); F? f = (D?.staticE = g); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(f, g); @@ -88,8 +82,6 @@ main() { h.D.staticE = new h.E(); h.G g = new h.G(); h.F? f = (h.D?.staticE = g); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(f, g); @@ -108,13 +100,9 @@ main() { // C?.v op= e2 is equivalent to C.v op= e2. C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(3, C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR @@ -128,8 +116,6 @@ main() { { D.staticE = new E(); F? f = (D?.staticE += 1); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(D.staticE, f); @@ -138,8 +124,6 @@ main() { { h.D.staticE = new h.E(); h.F? f = (h.D?.staticE += 1); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(h.D.staticE, f); diff --git a/tests/language/null_aware/assignment_test.dart b/tests/language/null_aware/assignment_test.dart index 3fdb555bf07..be318ed7f78 100644 --- a/tests/language/null_aware/assignment_test.dart +++ b/tests/language/null_aware/assignment_test.dart @@ -51,8 +51,6 @@ main() { { C c = new C(1); Expect.equals(2, c?.v = 2); - // ^ - // [cfe] Operand of null-aware operation '?.' has type 'C' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, c.v); @@ -62,8 +60,6 @@ main() { { C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, C.staticInt); @@ -71,8 +67,6 @@ main() { { h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, h.C.staticInt); @@ -97,8 +91,6 @@ main() { D.staticE = new E(); G g = new G(); F? f = (D?.staticE = g); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(f, g); @@ -107,8 +99,6 @@ main() { h.D.staticE = new h.E(); h.G g = new h.G(); h.F? f = (h.D?.staticE = g); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(f, g); @@ -119,7 +109,6 @@ main() { F? f = (D?.staticE = e); // ^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -131,8 +120,6 @@ main() { h.F f = (h.D?.staticE = e); // ^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -148,8 +135,6 @@ main() { { B b = new C(1); Expect.equals(2, b?.v = 2); - // ^ - // [cfe] Operand of null-aware operation '?.' has type 'B' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -162,8 +147,6 @@ main() { { C c = new C(1); Expect.equals(3, c?.v += 2); - // ^ - // [cfe] Operand of null-aware operation '?.' has type 'C' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(3, c.v); @@ -173,13 +156,9 @@ main() { { C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(3, C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR } @@ -188,8 +167,6 @@ main() { { D d = new D(new E()); F? f = (d?.v += 1); - // ^ - // [cfe] Operand of null-aware operation '?.' has type 'D' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(d.v, f); @@ -197,8 +174,6 @@ main() { { D.staticE = new E(); F? f = (D?.staticE += 1); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(D.staticE, f); @@ -206,8 +181,6 @@ main() { { h.D.staticE = new h.E(); h.F? f = (h.D?.staticE += 1); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(h.D.staticE, f); @@ -223,8 +196,6 @@ main() { { B bname = new C(1); bname?.v += 2; -// ^ -// [cfe] Operand of null-aware operation '?.' has type 'B' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -236,8 +207,6 @@ main() { { D d = new D(new E()); F? f = (d?.v += nullC()); - // ^ - // [cfe] Operand of null-aware operation '?.' has type 'D' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^^^^^^^ @@ -250,15 +219,12 @@ main() { // ^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT // [cfe] A value of type 'G?' can't be assigned to a variable of type 'H?'. - // [cfe] Operand of null-aware operation '?.' has type 'D' which excludes null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR } { D.staticE = new E(); F? f = (D?.staticE += nullC()); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^^^^^^^ @@ -268,8 +234,6 @@ main() { { h.D.staticE = new h.E(); h.F? f = (h.D?.staticE += h.nullC()); - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^^^^^^^^^ @@ -282,7 +246,6 @@ main() { H? h = (D?.staticE += 1); // ^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -293,8 +256,6 @@ main() { h.H? hh = (h.D?.staticE += 1); // ^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ diff --git a/tests/language/null_aware/increment_decrement_runtime_test.dart b/tests/language/null_aware/increment_decrement_runtime_test.dart index 01c72dafa3f..2b30572e86d 100644 --- a/tests/language/null_aware/increment_decrement_runtime_test.dart +++ b/tests/language/null_aware/increment_decrement_runtime_test.dart @@ -55,8 +55,6 @@ main() { { C.staticInt = 1; Expect.equals(1, C?.staticInt++); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, C.staticInt); @@ -64,8 +62,6 @@ main() { { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, h.C.staticInt); @@ -83,8 +79,6 @@ main() { E e1 = new E(); D.staticE = e1; E? e2 = D?.staticE++; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(e1, e2); @@ -93,8 +87,6 @@ main() { h.E e1 = new h.E(); h.D.staticE = e1; h.E? e2 = h.D?.staticE++; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(e1, e2); @@ -112,8 +104,6 @@ main() { { C.staticInt = 1; Expect.equals(1, C?.staticInt--); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(0, C.staticInt); @@ -121,8 +111,6 @@ main() { { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(0, h.C.staticInt); @@ -140,8 +128,6 @@ main() { E e1 = new E(); D.staticE = e1; E? e2 = D?.staticE--; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(e1, e2); @@ -150,8 +136,6 @@ main() { h.E e1 = new h.E(); h.D.staticE = e1; h.E? e2 = h.D?.staticE--; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(e1, e2); @@ -169,8 +153,6 @@ main() { { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, C.staticInt); @@ -178,8 +160,6 @@ main() { { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, h.C.staticInt); @@ -200,8 +180,6 @@ main() { { h.D.staticE = new h.E(); h.F? f = ++h.D?.staticE; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(h.D.staticE, f); @@ -219,8 +197,6 @@ main() { { C.staticInt = 1; Expect.equals(0, --C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(0, C.staticInt); @@ -228,8 +204,6 @@ main() { { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(0, h.C.staticInt); @@ -245,8 +219,6 @@ main() { { D.staticE = new E(); F? f = --D?.staticE; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(D.staticE, f); @@ -255,8 +227,6 @@ main() { { h.D.staticE = new h.E(); h.F? f = --h.D?.staticE; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(h.D.staticE, f); diff --git a/tests/language/null_aware/increment_decrement_test.dart b/tests/language/null_aware/increment_decrement_test.dart index 0e99f75a96a..b3fbe8c287c 100644 --- a/tests/language/null_aware/increment_decrement_test.dart +++ b/tests/language/null_aware/increment_decrement_test.dart @@ -52,8 +52,6 @@ main() { { C.staticInt = 1; Expect.equals(1, C?.staticInt++); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, C.staticInt); @@ -61,8 +59,6 @@ main() { { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, h.C.staticInt); @@ -88,8 +84,6 @@ main() { E e1 = new E(); D.staticE = e1; E? e2 = D?.staticE++; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(e1, e2); @@ -98,8 +92,6 @@ main() { h.E e1 = new h.E(); h.D.staticE = e1; h.E? e2 = h.D?.staticE++; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(e1, e2); @@ -110,7 +102,6 @@ main() { F? f = D?.staticE++; // ^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -123,8 +114,6 @@ main() { h.F? f = h.D?.staticE++; // ^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -144,8 +133,6 @@ main() { { C.staticInt = 1; Expect.equals(1, C?.staticInt--); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(0, C.staticInt); @@ -153,8 +140,6 @@ main() { { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(0, h.C.staticInt); @@ -180,8 +165,6 @@ main() { E e1 = new E(); D.staticE = e1; E? e2 = D?.staticE--; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(e1, e2); @@ -190,8 +173,6 @@ main() { h.E e1 = new h.E(); h.D.staticE = e1; h.E? e2 = h.D?.staticE--; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(e1, e2); @@ -202,7 +183,6 @@ main() { F? f = D?.staticE--; // ^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -215,8 +195,6 @@ main() { h.F? f = h.D?.staticE--; // ^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -236,8 +214,6 @@ main() { { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, C.staticInt); @@ -245,8 +221,6 @@ main() { { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(2, h.C.staticInt); @@ -270,8 +244,6 @@ main() { { D.staticE = new E(); F? f = ++D?.staticE; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(D.staticE, f); @@ -279,8 +251,6 @@ main() { { h.D.staticE = new h.E(); h.F? f = ++h.D?.staticE; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(h.D.staticE, f); @@ -290,8 +260,6 @@ main() { H? h = ++D?.staticE; // ^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -303,8 +271,6 @@ main() { h.H? hh = ++h.D?.staticE; // ^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -324,8 +290,6 @@ main() { { C.staticInt = 1; Expect.equals(0, --C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(0, C.staticInt); @@ -333,8 +297,6 @@ main() { { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); - // ^ - // [cfe] The class 'C' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.equals(0, h.C.staticInt); @@ -358,8 +320,6 @@ main() { { D.staticE = new E(); F? f = --D?.staticE; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(D.staticE, f); @@ -367,8 +327,6 @@ main() { { h.D.staticE = new h.E(); h.F? f = --h.D?.staticE; - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR Expect.identical(h.D.staticE, f); @@ -378,8 +336,6 @@ main() { H? h = --D?.staticE; // ^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ @@ -391,8 +347,6 @@ main() { h.H? hh = --h.D?.staticE; // ^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] The class 'D' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR // ^ diff --git a/tests/language/patterns/exhaustiveness/fallback_error_test.dart b/tests/language/patterns/exhaustiveness/fallback_error_test.dart index 144bb6d70a6..5e2577b5576 100644 --- a/tests/language/patterns/exhaustiveness/fallback_error_test.dart +++ b/tests/language/patterns/exhaustiveness/fallback_error_test.dart @@ -179,7 +179,6 @@ void nullAssertPattern(E? e) { E.e1! => 0, // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_ASSERT_PATTERN - // [cfe] The null-assert pattern will have no effect because the matched type isn't nullable. E.e2 => 1 }); } diff --git a/tests/language/patterns/relational_pattern_expression_precedence_error_test.dart b/tests/language/patterns/relational_pattern_expression_precedence_error_test.dart index c0b497beb16..f0cb73c0c00 100644 --- a/tests/language/patterns/relational_pattern_expression_precedence_error_test.dart +++ b/tests/language/patterns/relational_pattern_expression_precedence_error_test.dart @@ -55,7 +55,6 @@ void usingEquals(x) { // [cfe] This pattern cannot appear inside a unary pattern (cast pattern, null check pattern, or null assert pattern) without parentheses. // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_CHECK_PATTERN - // [cfe] The null-check pattern will have no effect because the matched type isn't nullable. // ^ // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN // [cfe] Expected ')' before this. @@ -111,7 +110,6 @@ void usingNotEquals(x) { // [cfe] This pattern cannot appear inside a unary pattern (cast pattern, null check pattern, or null assert pattern) without parentheses. // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_CHECK_PATTERN - // [cfe] The null-check pattern will have no effect because the matched type isn't nullable. // ^ // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN // [cfe] Expected ')' before this. @@ -170,7 +168,6 @@ void usingLessThanOrEquals(x) { // [cfe] The argument type 'bool' can't be assigned to the parameter type 'num'. // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_CHECK_PATTERN - // [cfe] The null-check pattern will have no effect because the matched type isn't nullable. // ^ // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN // [cfe] Expected ')' before this. @@ -229,7 +226,6 @@ void usingLessThan(x) { // [cfe] The argument type 'bool' can't be assigned to the parameter type 'num'. // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_CHECK_PATTERN - // [cfe] The null-check pattern will have no effect because the matched type isn't nullable. // ^ // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN // [cfe] Expected ')' before this. @@ -288,7 +284,6 @@ void usingGreaterThanOrEquals(x) { // [cfe] The argument type 'bool' can't be assigned to the parameter type 'num'. // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_CHECK_PATTERN - // [cfe] The null-check pattern will have no effect because the matched type isn't nullable. // ^ // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN // [cfe] Expected ')' before this. @@ -347,7 +342,6 @@ void usingGreaterThan(x) { // [cfe] The argument type 'bool' can't be assigned to the parameter type 'num'. // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_CHECK_PATTERN - // [cfe] The null-check pattern will have no effect because the matched type isn't nullable. // ^ // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN // [cfe] Expected ')' before this. diff --git a/tests/language/patterns/switch_trivial_exhaustiveness_error_test.dart b/tests/language/patterns/switch_trivial_exhaustiveness_error_test.dart index 07b95fa1964..555d8988e5e 100644 --- a/tests/language/patterns/switch_trivial_exhaustiveness_error_test.dart +++ b/tests/language/patterns/switch_trivial_exhaustiveness_error_test.dart @@ -314,7 +314,6 @@ void testNullCheckAlwaysMatches(Object x) { case _?: // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_CHECK_PATTERN - // [cfe] The null-check pattern will have no effect because the matched type isn't nullable. y = true; } y.expectStaticType>(); @@ -337,7 +336,6 @@ void testNullCheckSubpatternMayFailToMatch(Object x) { case int _?: // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_CHECK_PATTERN - // [cfe] The null-check pattern will have no effect because the matched type isn't nullable. y = true; } y.expectStaticType>(); @@ -370,7 +368,6 @@ void testNullAssertSubpatternMayFailToMatch(Object x) { case int _!: // ^ // [analyzer] STATIC_WARNING.UNNECESSARY_NULL_ASSERT_PATTERN - // [cfe] The null-assert pattern will have no effect because the matched type isn't nullable. y = true; } y.expectStaticType>(); @@ -662,8 +659,8 @@ void testRelationalEqualsNullWithNullScrutinee(Null x) { switch (x) { //^^^^^^ // [analyzer] COMPILE_TIME_ERROR.NON_EXHAUSTIVE_SWITCH_STATEMENT - // ^ - // [cfe] The type 'Null' is not exhaustively matched by the switch cases since it doesn't match 'null'. +// ^ +// [cfe] The type 'Null' is not exhaustively matched by the switch cases since it doesn't match 'null'. case == null: y = true; } diff --git a/tests/language/spread_collections/null_spread_test.dart b/tests/language/spread_collections/null_spread_test.dart index aad13317a6b..777378da58a 100644 --- a/tests/language/spread_collections/null_spread_test.dart +++ b/tests/language/spread_collections/null_spread_test.dart @@ -21,8 +21,6 @@ void uncalled(X x) { var l3 = [...?myNever]; // ^^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] Operand of null-aware operation '...?' has type 'Never' which excludes null. List l3b = l3; var s1 = {...?x, if (false) throw 1}; Set s1b = s1; @@ -31,8 +29,6 @@ void uncalled(X x) { var s3 = {...?myNever, if (false) throw 1}; // ^^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] Operand of null-aware operation '...?' has type 'Never' which excludes null. Set s3b = s3; var m1 = {...?x, if (false) throw 1: throw 1}; Map m1b = m1; @@ -41,8 +37,6 @@ void uncalled(X x) { var m3 = {...?myNever, if (false) throw 1: throw 1}; // ^^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] Operand of null-aware operation '...?' has type 'Never' which excludes null. Map m3b = m3; // Test non-empty collection of `Never` and `int`. @@ -53,8 +47,6 @@ void uncalled(X x) { var li3 = [...?myNever, 1]; // ^^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] Operand of null-aware operation '...?' has type 'Never' which excludes null. List li3b = li3; var si1 = {1, ...?x}; Set si1b = si1; @@ -63,8 +55,6 @@ void uncalled(X x) { var si3 = {1, ...?myNever}; // ^^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] Operand of null-aware operation '...?' has type 'Never' which excludes null. Set si3b = si3; var mi1 = {1: 1, ...?x}; Map mi1b = mi1; @@ -73,8 +63,6 @@ void uncalled(X x) { var mi3 = {1: 1, ...?myNever}; // ^^^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR - // ^ - // [cfe] Operand of null-aware operation '...?' has type 'Never' which excludes null. Map mi3b = mi3; } diff --git a/tests/language/super/conditional_operator_test.dart b/tests/language/super/conditional_operator_test.dart index 734f7fcc385..e10e02c7292 100644 --- a/tests/language/super/conditional_operator_test.dart +++ b/tests/language/super/conditional_operator_test.dart @@ -17,7 +17,6 @@ class C extends B { // ^^ // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER // [cfe] Cannot use '?.' here. - // ^ // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. ; @@ -34,8 +33,6 @@ class C extends B { // ^^ // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - // ^ - // [cfe] Operand of null-aware operation '??=' has type 'int' which excludes null. // ^ // [analyzer] STATIC_WARNING.DEAD_NULL_AWARE_EXPRESSION super?.field; @@ -77,38 +74,26 @@ class C extends B { // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. super?.method(); -// ^ -// [cfe] The receiver 'this' cannot be null. - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. +// ^^ +// [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER +// [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. 1 * super?.method(); - // ^ - // [cfe] The receiver 'this' cannot be null. // ^^ // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. -super?.method(); -// ^ -// [cfe] The receiver 'this' cannot be null. - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. +// ^^ +// [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER +// [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. ~super?.method(); -// ^ -// [cfe] The receiver 'this' cannot be null. - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. +// ^^ +// [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER +// [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. !super?.method(); -// ^ -// [cfe] The receiver 'this' cannot be null. - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. +// ^^ +// [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER +// [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. --super?.method(); - //^ - // [cfe] The receiver 'this' cannot be null. // ^^ // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. @@ -117,8 +102,6 @@ class C extends B { // ^ // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR ++super?.method(); - //^ - // [cfe] The receiver 'this' cannot be null. // ^^ // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. diff --git a/tests/language/this/conditional_operator_runtime_test.dart b/tests/language/this/conditional_operator_runtime_test.dart index ccecb55e2a1..4b99c70a996 100644 --- a/tests/language/this/conditional_operator_runtime_test.dart +++ b/tests/language/this/conditional_operator_runtime_test.dart @@ -18,25 +18,17 @@ class B { test() { this?.field = 1; -// ^ -// [cfe] The receiver 'this' cannot be null. - // ^^ - // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR +// ^^ +// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR this?.field += 1; -// ^ -// [cfe] The receiver 'this' cannot be null. - // ^^ - // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR +// ^^ +// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR this?.field; -// ^ -// [cfe] The receiver 'this' cannot be null. - // ^^ - // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR +// ^^ +// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR this?.method(); -// ^ -// [cfe] The receiver 'this' cannot be null. - // ^^ - // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR +// ^^ +// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR } } diff --git a/tests/language/this/conditional_operator_test.dart b/tests/language/this/conditional_operator_test.dart index e03f998fbd6..8297a2f12cc 100644 --- a/tests/language/this/conditional_operator_test.dart +++ b/tests/language/this/conditional_operator_test.dart @@ -15,37 +15,27 @@ class B { : this?.namedConstructor() //^^^^ // [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS - // [cfe] Expected an assignment after the field name. - //^^^^ // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNMENT_IN_INITIALIZER //^^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD - // [error line 15, column 11, length 0] - // [cfe] Expected '.' before this. + // [cfe] Expected an assignment after the field name. // ^^ // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN + // [cfe] Expected '.' before this. // [cfe] Expected an identifier, but got ''. ; test() { this?.field = 1; -// ^ -// [cfe] The receiver 'this' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR this?.field += 1; -// ^ -// [cfe] The receiver 'this' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR this?.field; -// ^ -// [cfe] The receiver 'this' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR this?.method(); -// ^ -// [cfe] The receiver 'this' cannot be null. // ^^ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR }