Index: pkg/analyzer/lib/src/dart/element/type.dart |
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart |
index dab72dcd6a70cc0dc0a8eb023013f18297cc3e36..c1feff9e4553d795f1e3cf4d195c9f937f4c4673 100644 |
--- a/pkg/analyzer/lib/src/dart/element/type.dart |
+++ b/pkg/analyzer/lib/src/dart/element/type.dart |
@@ -1598,6 +1598,12 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType { |
bool isMoreSpecificThan(DartType type, |
[bool withDynamic = false, Set<Element> visitedElements]) { |
// |
+ // T is Null and S is not Bottom. |
+ // |
+ if (isDartCoreNull && !type.isBottom) { |
+ return true; |
+ } |
+ |
// S is dynamic. |
// The test to determine whether S is dynamic is done here because dynamic |
// is not an instance of InterfaceType. |