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

Unified Diff: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart

Issue 17482005: Use the inferred return type of the factory instead of the inferred type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (revision 24223)
+++ sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (working copy)
@@ -131,11 +131,11 @@
TypeMask getReturnTypeOfElement(Element element) {
if (compiler.disableTypeInference) return dynamicType;
- return internal.getReturnTypeOfElement(element);
+ return internal.getReturnTypeOfElement(element.implementation);
}
TypeMask getTypeOfElement(Element element) {
if (compiler.disableTypeInference) return dynamicType;
- return internal.getTypeOfElement(element);
+ return internal.getTypeOfElement(element.implementation);
}
TypeMask getTypeOfNode(Element owner, Node node) {
if (compiler.disableTypeInference) return dynamicType;
@@ -148,7 +148,7 @@
Iterable<Element> getCallersOf(Element element) {
if (compiler.disableTypeInference) throw "Don't use me";
- Iterable<Element> result = internal.callersOf[element];
+ Iterable<Element> result = internal.callersOf[element.implementation];
return result == null
? internal.callersOf[element] = const <Element>[]
: result;
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | tests/compiler/dart2js/inferrer_factory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698