@@ -248,8 +248,7 @@ class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
248248 }
249249
250250 @override
251- IsSubtypeOf performNullabilityAwareSubtypeCheck (
252- DartType subtype, DartType supertype) {
251+ IsSubtypeOf performSubtypeCheck (DartType subtype, DartType supertype) {
253252 if (subtype is UnknownType ) return const IsSubtypeOf .success ();
254253
255254 DartType unwrappedSupertype = supertype;
@@ -259,7 +258,7 @@ class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
259258 if (unwrappedSupertype is UnknownType ) {
260259 return const IsSubtypeOf .success ();
261260 }
262- return super .performNullabilityAwareSubtypeCheck (subtype, supertype);
261+ return super .performSubtypeCheck (subtype, supertype);
263262 }
264263
265264 // TODO(johnniwinther): Should [context] be non-nullable?
@@ -309,9 +308,9 @@ class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
309308
310309 if (! isEmptyContext (returnContextType)) {
311310 if (isConst) {
312- returnContextType = new NullabilityAwareFreeTypeParameterEliminator (
313- coreTypes: coreTypes)
314- .eliminateToLeast (returnContextType! );
311+ returnContextType =
312+ new FreeTypeParameterEliminator ( coreTypes: coreTypes)
313+ .eliminateToLeast (returnContextType! );
315314 }
316315 gatherer.tryConstrainUpper (declaredReturnType! , returnContextType! ,
317316 treeNodeForTesting: treeNodeForTesting);
@@ -548,11 +547,11 @@ class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
548547 }
549548}
550549
551- class TypeParameterEliminator extends Substitution {
550+ class AllTypeParameterEliminator extends Substitution {
552551 final DartType bottomType;
553552 final DartType topType;
554553
555- TypeParameterEliminator (this .bottomType, this .topType);
554+ AllTypeParameterEliminator (this .bottomType, this .topType);
556555
557556 @override
558557 DartType getSubstitute (TypeParameter parameter, bool upperBound) {
0 commit comments