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

Unified Diff: pkg/compiler/lib/src/ssa/types.dart

Issue 2939033002: Towards compiling Hello World! (Closed)
Patch Set: Fix parameter ordering 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/compiler/lib/src/ssa/types.dart
diff --git a/pkg/compiler/lib/src/ssa/types.dart b/pkg/compiler/lib/src/ssa/types.dart
index 9ebbc552ae4aece8bb82bfbaf856baa38f01aa01..29cc9ab598c43fcc9710f78e1eab0ea0d5c1452c 100644
--- a/pkg/compiler/lib/src/ssa/types.dart
+++ b/pkg/compiler/lib/src/ssa/types.dart
@@ -4,6 +4,7 @@
import '../common_elements.dart' show CommonElements;
import '../elements/elements.dart';
+import '../elements/entities.dart';
import '../native/native.dart' as native;
import '../types/types.dart';
import '../universe/selector.dart' show Selector;
@@ -17,7 +18,11 @@ class TypeMaskFactory {
}
static TypeMask inferredTypeForMember(
- MemberElement element, GlobalTypeInferenceResults results) {
+ MemberEntity element, GlobalTypeInferenceResults results) {
+ // TODO(johnniwinther): Support inferred types for member entities.
+ if (element is! MemberElement) {
+ return results.closedWorld.commonMasks.dynamicType;
+ }
return results.resultOfMember(element).type ??
results.closedWorld.commonMasks.dynamicType;
}

Powered by Google App Engine
This is Rietveld 408576698