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

Unified Diff: pkg/analyzer/lib/src/task/strong_mode.dart

Issue 1763013003: Fix method inference crasher (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/analyzer/lib/src/task/strong_mode.dart
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
index bb5a615e0ef9ef03fec58bfc54fb1aa685bcffeb..0ab8a8bbff15dd5850f1a372a2a74ef9f3050c92 100644
--- a/pkg/analyzer/lib/src/task/strong_mode.dart
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -284,11 +284,13 @@ class InstanceMemberInferrer {
List<FunctionType> overriddenTypes = new List<FunctionType>();
for (ExecutableElement overriddenMethod in overriddenMethods) {
FunctionType overriddenType = overriddenMethod.type;
- if (overriddenType.typeFormals.isNotEmpty &&
- overriddenType.typeFormals.length != typeFormals.length) {
- return;
+ if (overriddenType.typeFormals.isNotEmpty) {
+ if (overriddenType.typeFormals.length != typeFormals.length) {
+ return;
+ }
+ overriddenType = overriddenType.instantiate(typeFormals);
}
- overriddenTypes.add(overriddenType.instantiate(typeFormals));
+ overriddenTypes.add(overriddenType);
}
//

Powered by Google App Engine
This is Rietveld 408576698