Skip to content

Commit a600e97

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Don't compare typeArguments for FunctionType(s) equality.
Change-Id: I9245de1cc16f912af2141dee34b03f401d89a534 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106240 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 6af2186 commit a600e97

2 files changed

Lines changed: 1 addition & 118 deletions

File tree

pkg/analyzer/lib/src/dart/element/type.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import 'package:analyzer/src/generated/engine.dart'
1313
show AnalysisContext, AnalysisEngine;
1414
import 'package:analyzer/src/generated/resolver.dart';
1515
import 'package:analyzer/src/generated/type_system.dart';
16-
import 'package:analyzer/src/generated/utilities_collection.dart';
1716
import 'package:analyzer/src/generated/utilities_dart.dart';
1817
import 'package:analyzer/src/summary/resynthesize.dart'
1918
show RecursiveInstantiateToBounds;
@@ -725,8 +724,7 @@ abstract class FunctionTypeImpl extends TypeImpl implements FunctionType {
725724
normalParameterTypes, object.normalParameterTypes) &&
726725
TypeImpl.equalArrays(
727726
optionalParameterTypes, object.optionalParameterTypes) &&
728-
_equals(namedParameterTypes, object.namedParameterTypes) &&
729-
TypeImpl.equalArrays(typeArguments, object.typeArguments);
727+
_equals(namedParameterTypes, object.namedParameterTypes);
730728
}
731729
return false;
732730
}
@@ -2262,9 +2260,6 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
22622260

22632261
List<DartType> newTypeArguments = TypeImpl.substitute(
22642262
typeArguments, argumentTypes, parameterTypes, prune);
2265-
if (listsEqual(newTypeArguments, typeArguments)) {
2266-
return this;
2267-
}
22682263

22692264
InterfaceTypeImpl newType =
22702265
new InterfaceTypeImpl(element, prune, nullabilitySuffix);

tests/compiler/dartdevc_native/debugger/debugger_test_golden.txt

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,34 +1614,6 @@ Value:
16141614
]
16151615
]
16161616
],
1617-
[
1618-
"li",
1619-
{
1620-
"style": "padding-left: 13px;"
1621-
},
1622-
[
1623-
"span",
1624-
{
1625-
"style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
1626-
},
1627-
"toString: "
1628-
],
1629-
[
1630-
"span",
1631-
{
1632-
"style": "margin-left: 13px"
1633-
},
1634-
[
1635-
"object",
1636-
{
1637-
"object": "<OBJECT>",
1638-
"config": {
1639-
"name": "none"
1640-
}
1641-
}
1642-
]
1643-
]
1644-
],
16451617
[
16461618
"li",
16471619
{
@@ -1698,34 +1670,6 @@ Value:
16981670
]
16991671
]
17001672
],
1701-
[
1702-
"li",
1703-
{
1704-
"style": "padding-left: 13px;"
1705-
},
1706-
[
1707-
"span",
1708-
{
1709-
"style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
1710-
},
1711-
"_equals: "
1712-
],
1713-
[
1714-
"span",
1715-
{
1716-
"style": "margin-left: 13px"
1717-
},
1718-
[
1719-
"object",
1720-
{
1721-
"object": "<OBJECT>",
1722-
"config": {
1723-
"name": "none"
1724-
}
1725-
}
1726-
]
1727-
]
1728-
],
17291673
[
17301674
"li",
17311675
{
@@ -3307,34 +3251,6 @@ Value:
33073251
]
33083252
]
33093253
],
3310-
[
3311-
"li",
3312-
{
3313-
"style": "padding-left: 13px;"
3314-
},
3315-
[
3316-
"span",
3317-
{
3318-
"style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
3319-
},
3320-
"toString: "
3321-
],
3322-
[
3323-
"span",
3324-
{
3325-
"style": "margin-left: 13px"
3326-
},
3327-
[
3328-
"object",
3329-
{
3330-
"object": "<OBJECT>",
3331-
"config": {
3332-
"name": "none"
3333-
}
3334-
}
3335-
]
3336-
]
3337-
],
33383254
[
33393255
"li",
33403256
{
@@ -3391,34 +3307,6 @@ Value:
33913307
]
33923308
]
33933309
],
3394-
[
3395-
"li",
3396-
{
3397-
"style": "padding-left: 13px;"
3398-
},
3399-
[
3400-
"span",
3401-
{
3402-
"style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
3403-
},
3404-
"_equals: "
3405-
],
3406-
[
3407-
"span",
3408-
{
3409-
"style": "margin-left: 13px"
3410-
},
3411-
[
3412-
"object",
3413-
{
3414-
"object": "<OBJECT>",
3415-
"config": {
3416-
"name": "none"
3417-
}
3418-
}
3419-
]
3420-
]
3421-
],
34223310
[
34233311
"li",
34243312
{

0 commit comments

Comments
 (0)