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

Unified Diff: pkg/analyzer/lib/src/generated/static_type_analyzer.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
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/sdk/ddc_sdk.sum » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 3c166adcfdda0a804d9668075c397bfaf6b1bda6..3a375580ebd0ae15c50a7be67bbf9e794c422422 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -2082,6 +2082,10 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
if (typeStr == '-dynamic') {
returnType = _typeProvider.bottomType;
} else {
+ var components = typeStr.split('|');
+ if (components.remove('Null')) {
+ typeStr = components.join('|');
+ }
returnType = _getElementNameAsType(
_typeProvider.objectType.element.library, typeStr, null);
}
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/sdk/ddc_sdk.sum » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698