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

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

Issue 1688343003: Make "Unbound type parameter" bugs easier to investigate. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/summarize_elements.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 7a5fc02b8427751f92780db1250914e6aa2c6454..c18ec66974bba635150fd8e0ed10ac43b14c0b9c 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -295,6 +295,7 @@ class _CompilationUnitSerializer {
* parameter [type].
*/
int findTypeParameterIndex(TypeParameterType type, Element context) {
+ Element originalContext = context;
int index = 0;
while (context != null) {
List<TypeParameterElement> typeParameters;
@@ -316,7 +317,8 @@ class _CompilationUnitSerializer {
}
context = context.enclosingElement;
}
- throw new StateError('Unbound type parameter $type');
+ throw new StateError(
+ 'Unbound type parameter $type (${originalContext?.location})');
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698