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

Unified Diff: pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart

Issue 2965633002: Fix handling of inline JS types in DDC. (Closed)
Patch Set: Created 3 years, 6 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/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;
}
}

Powered by Google App Engine
This is Rietveld 408576698