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

Unified Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2741033004: Infer types of instance methods before any other inference. (Closed)
Patch Set: Created 3 years, 9 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 | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index a43bc65dd11b97f840e38139a04eea73c4794aab..3563ac721eb4899d1c4a4736c7642d3eeaa27a0f 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -354,6 +354,8 @@ abstract class ClassElementForLink extends Object
/// TODO(brianwilkerson) This appears to be unused and might be removable.
bool hasBeenInferred;
+ bool hasInferredInstanceMethods = false;
+
ClassElementForLink(CompilationUnitElementForLink enclosingElement)
: enclosingElement = enclosingElement,
hasBeenInferred = !enclosingElement.isInBuildUnit;
@@ -1287,9 +1289,11 @@ class CompilationUnitElementInBuildUnit extends CompilationUnitElementForLink {
*/
void link() {
if (library._linker.strongMode) {
- new InstanceMemberInferrer(enclosingElement._linker.typeProvider,
- enclosingElement.inheritanceManager)
- .inferCompilationUnit(this);
+ var inferrer = new InstanceMemberInferrer(
+ enclosingElement._linker.typeProvider,
+ enclosingElement.inheritanceManager);
+ inferrer.inferInstanceMethods(this);
+ inferrer.inferCompilationUnit(this);
for (TopLevelVariableElementForLink variable in topLevelVariables) {
variable.link(this);
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698