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

Unified Diff: pkg/analyzer/lib/src/generated/element.dart

Issue 818733006: Fix for issue 21982 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/instrumentation/instrumentation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/element.dart
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index b1023831c276b9e4d6e46b91016cceae584d4c5d..671547f22fb61773977b56297c3159e5a0d9ba80 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -2641,7 +2641,19 @@ class ConstructorElementImpl extends ExecutableElementImpl implements
@override
void appendTo(StringBuffer buffer) {
- buffer.write(enclosingElement.displayName);
+ if (enclosingElement == null) {
+ String message;
+ String name = displayName;
+ if (name != null && !name.isEmpty) {
+ message = 'Found constructor element named $name with no enclosing element';
+ } else {
+ message = 'Found unnamed constructor element with no enclosing element';
+ }
+ AnalysisEngine.instance.instrumentationService.logError(message);
+ buffer.write('<unknown class>');
+ } else {
+ buffer.write(enclosingElement.displayName);
+ }
String name = displayName;
if (name != null && !name.isEmpty) {
buffer.write(".");
@@ -4856,7 +4868,7 @@ abstract class FieldElement implements ClassMemberElement,
PropertyInducingElement {
/**
* Return {@code true} if this element is an enum constant.
- *
+ *
* @return {@code true} if this an enum constant
*/
bool get isEnumConstant;
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698