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

Unified Diff: pkg/analyzer/lib/src/dart/ast/token.dart

Issue 2081603002: When copying TokenWithComment, use copy of its comments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/generated/utilities_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/ast/token.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/token.dart b/pkg/analyzer/lib/src/dart/ast/token.dart
index 98281134d268d2316a22d842eeb2d6d5a218dc05..baae1b8a33e2a8d770388963368b376df371b497 100644
--- a/pkg/analyzer/lib/src/dart/ast/token.dart
+++ b/pkg/analyzer/lib/src/dart/ast/token.dart
@@ -569,5 +569,6 @@ class TokenWithComment extends SimpleToken {
}
@override
- Token copy() => new TokenWithComment(type, offset, precedingComments);
+ Token copy() =>
+ new TokenWithComment(type, offset, copyComments(precedingComments));
}
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/utilities_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698