File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed
pkg/analyzer/lib/src/dart/element Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -175,12 +175,11 @@ class _ClassInterfaceType {
175175 } else if (type == _singleType) {
176176 return ;
177177 } else {
178- _currentResult =
179- _typeSystem.normalize (_singleType! ) as InterfaceTypeImpl ;
178+ _currentResult = _typeSystem.normalizeInterfaceType (_singleType! );
180179 }
181180 }
182181
183- var normType = _typeSystem.normalize (type) as InterfaceTypeImpl ;
182+ var normType = _typeSystem.normalizeInterfaceType (type);
184183 try {
185184 _currentResult = _merge (_currentResult! , normType);
186185 } catch (e) {
Original file line number Diff line number Diff line change @@ -1183,7 +1183,7 @@ class InheritanceManager3 {
11831183
11841184 var resultType = validOverrides
11851185 .map ((e) {
1186- return typeSystem.normalize (e.type) as FunctionTypeImpl ;
1186+ return typeSystem.normalizeFunctionType (e.type);
11871187 })
11881188 .reduce ((previous, next) {
11891189 return typeSystem.topMerge (previous, next) as FunctionTypeImpl ;
Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ class NormalizeHelper {
2929 return _normalize (T );
3030 }
3131
32+ FunctionTypeImpl normalizeFunctionType (FunctionTypeImpl T ) {
33+ return _normalize (T ) as FunctionTypeImpl ;
34+ }
35+
36+ InterfaceTypeImpl normalizeInterfaceType (InterfaceTypeImpl T ) {
37+ return _normalize (T ) as InterfaceTypeImpl ;
38+ }
39+
3240 /// `NORM(R Function<X extends B>(S)) = R1 Function(X extends B1>(S1)`
3341 /// * where R1 = NORM(R)
3442 /// * and B1 = NORM(B)
Original file line number Diff line number Diff line change @@ -1477,6 +1477,14 @@ class TypeSystemImpl implements TypeSystem {
14771477 return NormalizeHelper (this ).normalize (T );
14781478 }
14791479
1480+ FunctionTypeImpl normalizeFunctionType (FunctionTypeImpl T ) {
1481+ return NormalizeHelper (this ).normalizeFunctionType (T );
1482+ }
1483+
1484+ InterfaceTypeImpl normalizeInterfaceType (InterfaceTypeImpl T ) {
1485+ return NormalizeHelper (this ).normalizeInterfaceType (T );
1486+ }
1487+
14801488 /// Returns a non-nullable version of [type] . This is equivalent to the
14811489 /// operation `NonNull` defined in the spec.
14821490 @override
You can’t perform that action at this time.
0 commit comments