@@ -92,10 +92,7 @@ class Types with StandardBounds {
9292 when tClassReference == hierarchy.coreTypes.objectClass.reference &&
9393 s.extensionTypeErasure.isPotentiallyNullable &&
9494 ! t.isPotentiallyNullable:
95- return new IsSubtypeOf .onlyIfIgnoringNullabilities (
96- subtype: s,
97- supertype: t,
98- );
95+ return const IsSubtypeOf .failure ();
9996 case (_, InterfaceType (classReference: Reference tClassReference))
10097 when tClassReference == hierarchy.coreTypes.objectClass.reference &&
10198 s is ! FutureOrType :
@@ -364,12 +361,7 @@ class Types with StandardBounds {
364361 /// From the NNBD spec: For each j such that r0j is required,
365362 /// then there exists an i in n+1...q such that xj = yi, and r1i
366363 /// is required
367- result = result.and (
368- new IsSubtypeOf .onlyIfIgnoringNullabilities (
369- subtype: sFunctionType,
370- supertype: tFunctionType,
371- ),
372- );
364+ result = const IsSubtypeOf .failure ();
373365 }
374366 }
375367 if (sCount == sNamedParameters.length) {
@@ -393,12 +385,7 @@ class Types with StandardBounds {
393385 /// there exists an i in n+1...q such that xj = yi, and r1i is
394386 /// required
395387 if (sNamedParameter.isRequired && ! tNamedParameter.isRequired) {
396- result = result.and (
397- new IsSubtypeOf .onlyIfIgnoringNullabilities (
398- subtype: sFunctionType,
399- supertype: tFunctionType,
400- ),
401- );
388+ result = const IsSubtypeOf .failure ();
402389 }
403390 }
404391 for (; sCount < sNamedParameters.length; sCount++ ) {
@@ -407,12 +394,7 @@ class Types with StandardBounds {
407394 /// From the NNBD spec: For each j such that r0j is required, then
408395 /// there exists an i in n+1...q such that xj = yi, and r1i is
409396 /// required
410- result = result.and (
411- new IsSubtypeOf .onlyIfIgnoringNullabilities (
412- subtype: sFunctionType,
413- supertype: tFunctionType,
414- ),
415- );
397+ result = const IsSubtypeOf .failure ();
416398 }
417399 }
418400 }
0 commit comments