From b4eceecdc3bf81f6fc8d4e045b101a69637186d8 Mon Sep 17 00:00:00 2001 From: pq Date: Mon, 27 Jan 2025 15:12:28 -0800 Subject: [PATCH] [element model] migrate `typed_literal_resolver` Change-Id: Ic90d4c498205f317cca293d8695f7f906f3cb79b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406201 Commit-Queue: Konstantin Shcheglov Reviewed-by: Konstantin Shcheglov Auto-Submit: Phil Quitslund --- .../lib/src/dart/resolver/typed_literal_resolver.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart index c5cd6d297b5..f78fbdcdba3 100644 --- a/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart +++ b/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart @@ -2,8 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// ignore_for_file: analyzer_use_new_elements - import 'package:analyzer/dart/analysis/analysis_options.dart'; import 'package:analyzer/dart/analysis/features.dart'; import 'package:analyzer/dart/element/nullability_suffix.dart'; @@ -709,11 +707,11 @@ class TypedLiteralResolver { // The literal is ambiguous, and further analysis won't resolve the // ambiguity. Leave it as neither a set nor a map. } else if (literalType is InterfaceType && - literalType.element == _typeProvider.mapElement) { + literalType.element3 == _typeProvider.mapElement2) { node.becomeMap(); } else { assert(literalType is InterfaceType && - literalType.element == _typeProvider.setElement); + literalType.element3 == _typeProvider.setElement2); node.becomeSet(); } if (_strictInference &&