Skip to content

Commit b4eceec

Browse files
pqCommit Queue
authored andcommitted
[element model] migrate typed_literal_resolver
Change-Id: Ic90d4c498205f317cca293d8695f7f906f3cb79b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406201 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Auto-Submit: Phil Quitslund <[email protected]>
1 parent f98a7f9 commit b4eceec

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// ignore_for_file: analyzer_use_new_elements
6-
75
import 'package:analyzer/dart/analysis/analysis_options.dart';
86
import 'package:analyzer/dart/analysis/features.dart';
97
import 'package:analyzer/dart/element/nullability_suffix.dart';
@@ -709,11 +707,11 @@ class TypedLiteralResolver {
709707
// The literal is ambiguous, and further analysis won't resolve the
710708
// ambiguity. Leave it as neither a set nor a map.
711709
} else if (literalType is InterfaceType &&
712-
literalType.element == _typeProvider.mapElement) {
710+
literalType.element3 == _typeProvider.mapElement2) {
713711
node.becomeMap();
714712
} else {
715713
assert(literalType is InterfaceType &&
716-
literalType.element == _typeProvider.setElement);
714+
literalType.element3 == _typeProvider.setElement2);
717715
node.becomeSet();
718716
}
719717
if (_strictInference &&

0 commit comments

Comments
 (0)