Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: pkg/analyzer/lib/src/generated/element_resolver.dart

Issue 2638183002: Issue 28027. Move Null to the bottom in the Analyzer. (Closed)
Patch Set: Fixes for review comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/type.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/element_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index 962e6f627e182a1a3b98504dd278c475bd3a4de0..4b1fd5c66675ceaf8c623cc0ffbd526e0edf1130 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -1316,7 +1316,7 @@ class ElementResolver extends SimpleAstVisitor<Object> {
return null;
}
return StaticTypeWarningCode.UNDEFINED_FUNCTION;
- } else if (!targetType.isDynamic && !targetType.isBottom) {
+ } else if (!targetType.isDynamic && target is! NullLiteral) {
// Proxy-conditional warning, based on state of
// targetType.getElement()
return StaticTypeWarningCode.UNDEFINED_METHOD;
@@ -1561,7 +1561,7 @@ class ElementResolver extends SimpleAstVisitor<Object> {
DartType _getStaticTypeOrFunctionType(Expression expression) {
if (expression is NullLiteral) {
- return _resolver.typeProvider.bottomType;
+ return _resolver.typeProvider.nullType;
}
return _resolveTypeParameter(expression.staticType);
}
@@ -2498,7 +2498,7 @@ class ElementResolver extends SimpleAstVisitor<Object> {
* [member] in the given [type] and not finding any member.
*/
bool _shouldReportMissingMember(DartType type, Element member) {
- return member == null && type != null && !type.isDynamic && !type.isBottom;
+ return member == null && type != null && !type.isDynamic && !type.isDartCoreNull;
}
/**
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/type.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698