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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.body_builder; 5 library fasta.body_builder;
6 6
7 import '../parser/parser.dart' show FormalParameterType, optional; 7 import '../parser/parser.dart' show FormalParameterType, optional;
8 8
9 import '../parser/error_kind.dart' show ErrorKind; 9 import '../parser/error_kind.dart' show ErrorKind;
10 10
(...skipping 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 2696
2697 String getNodeName(Object node) { 2697 String getNodeName(Object node) {
2698 if (node is Identifier) { 2698 if (node is Identifier) {
2699 return node.name; 2699 return node.name;
2700 } else if (node is UnresolvedIdentifier) { 2700 } else if (node is UnresolvedIdentifier) {
2701 return node.name.name; 2701 return node.name.name;
2702 } else if (node is TypeDeclarationBuilder) { 2702 } else if (node is TypeDeclarationBuilder) {
2703 return node.name; 2703 return node.name;
2704 } else if (node is PrefixBuilder) { 2704 } else if (node is PrefixBuilder) {
2705 return node.name; 2705 return node.name;
2706 } else if (node is ThisPropertyAccessor) { 2706 } else if (node is ThisAccessor) {
2707 return node.name.name; 2707 return node.isSuper ? "super" : "this";
2708 } else if (node is BuilderAccessor) {
2709 return node.plainNameForRead;
2708 } else { 2710 } else {
2709 return internalError("Unhandled: ${node.runtimeType}"); 2711 return internalError("Unhandled: ${node.runtimeType}");
2710 } 2712 }
2711 } 2713 }
OLDNEW
« 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