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

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

Issue 1842533002: Don't serialize Label in NamedExpression as a label declaration. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/summarize_ast.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index b268f3d1dc9262fcf18018a1b8fb64e30c65c462..715267bde9d6f8e81af3d2ab7f2b08175efb27c4 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -1139,12 +1139,14 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
@override
void visitLabel(Label node) {
AstNode parent = node.parent;
- labels.add(new UnlinkedLabelBuilder(
- name: node.label.name,
- nameOffset: node.offset,
- isOnSwitchMember: parent is SwitchMember,
- isOnSwitchStatement:
- parent is LabeledStatement && parent.statement is SwitchStatement));
+ if (parent is! NamedExpression) {
+ labels.add(new UnlinkedLabelBuilder(
+ name: node.label.name,
+ nameOffset: node.offset,
+ isOnSwitchMember: parent is SwitchMember,
+ isOnSwitchStatement: parent is LabeledStatement &&
+ parent.statement is SwitchStatement));
+ }
}
@override
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698