@@ -248,8 +248,7 @@ class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
248
248
}
249
249
250
250
@override
251
- IsSubtypeOf performNullabilityAwareSubtypeCheck (
252
- DartType subtype, DartType supertype) {
251
+ IsSubtypeOf performSubtypeCheck (DartType subtype, DartType supertype) {
253
252
if (subtype is UnknownType ) return const IsSubtypeOf .success ();
254
253
255
254
DartType unwrappedSupertype = supertype;
@@ -259,7 +258,7 @@ class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
259
258
if (unwrappedSupertype is UnknownType ) {
260
259
return const IsSubtypeOf .success ();
261
260
}
262
- return super .performNullabilityAwareSubtypeCheck (subtype, supertype);
261
+ return super .performSubtypeCheck (subtype, supertype);
263
262
}
264
263
265
264
// TODO(johnniwinther): Should [context] be non-nullable?
@@ -309,9 +308,9 @@ class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
309
308
310
309
if (! isEmptyContext (returnContextType)) {
311
310
if (isConst) {
312
- returnContextType = new NullabilityAwareFreeTypeParameterEliminator (
313
- coreTypes: coreTypes)
314
- .eliminateToLeast (returnContextType! );
311
+ returnContextType =
312
+ new FreeTypeParameterEliminator ( coreTypes: coreTypes)
313
+ .eliminateToLeast (returnContextType! );
315
314
}
316
315
gatherer.tryConstrainUpper (declaredReturnType! , returnContextType! ,
317
316
treeNodeForTesting: treeNodeForTesting);
@@ -548,11 +547,11 @@ class TypeSchemaEnvironment extends HierarchyBasedTypeEnvironment
548
547
}
549
548
}
550
549
551
- class TypeParameterEliminator extends Substitution {
550
+ class AllTypeParameterEliminator extends Substitution {
552
551
final DartType bottomType;
553
552
final DartType topType;
554
553
555
- TypeParameterEliminator (this .bottomType, this .topType);
554
+ AllTypeParameterEliminator (this .bottomType, this .topType);
556
555
557
556
@override
558
557
DartType getSubstitute (TypeParameter parameter, bool upperBound) {
0 commit comments