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

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.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
Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 325f7235511705dfbbd386a875b094eab0933dfb..c29be046eae2caa6b2598d853f422c789962d5e6 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -2402,8 +2402,11 @@ class FixProcessor {
void _appendParameterForArgument(
SourceBuilder sb, Set<String> excluded, int index, Expression argument) {
- // append type name
DartType type = argument.bestType;
+ if (type == null || type.isBottom || type.isDartCoreNull) {
+ type = DynamicTypeImpl.instance;
+ }
+ // append type name
String typeSource = utils.getTypeSource(type, librariesToImport);
if (typeSource != 'dynamic') {
sb.startPosition('TYPE$index');

Powered by Google App Engine
This is Rietveld 408576698