Index: pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart |
diff --git a/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart b/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart |
index dbba17103ecbab2aa55ccc7736710580ac6de378..45330349f4329dbccb85904126868b4a34b9a5fd 100644 |
--- a/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart |
+++ b/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart |
@@ -184,7 +184,9 @@ abstract class NullableTypeInference { |
var first = args.isNotEmpty ? args.first : null; |
if (first is SimpleStringLiteral) { |
var types = first.stringValue; |
- if (!types.split('|').contains('Null')) { |
+ if (types != '' && |
+ types != 'var' && |
+ !types.split('|').contains('Null')) { |
return false; |
} |
} |