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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2738713004: Fix crash when reporting error involving constructor. (Closed)
Patch Set: Add special case for ThisAccessor. 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 | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 971aab6145d9b469fdd6c68f800a9839c016c94f..d52d0ed4f2e09ae891afc4ad7ceb3eed030081ad 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -2703,8 +2703,10 @@ String getNodeName(Object node) {
return node.name;
} else if (node is PrefixBuilder) {
return node.name;
- } else if (node is ThisPropertyAccessor) {
- return node.name.name;
+ } else if (node is ThisAccessor) {
+ return node.isSuper ? "super" : "this";
+ } else if (node is BuilderAccessor) {
+ return node.plainNameForRead;
} else {
return internalError("Unhandled: ${node.runtimeType}");
}
« no previous file with comments | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698