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

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

Issue 137863002: Issue 8742. Preserve leading line comments during java2dart translation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Test for block-style comment translation. Created 6 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/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/html.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 0c2a94fd7a023a7b865dc5a805980319e43db15f..e9cce74200b09f133698cace2e4914cadb03111b 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -440,10 +440,12 @@ class AnalysisError {
if (identical(obj, this)) {
return true;
}
+ // prepare other AnalysisError
if (obj is! AnalysisError) {
return false;
}
AnalysisError other = obj as AnalysisError;
+ // Quick checks.
if (errorCode != other.errorCode) {
return false;
}
@@ -453,12 +455,14 @@ class AnalysisError {
if (isStaticOnly != other.isStaticOnly) {
return false;
}
+ // Deep checks.
if (_message != other._message) {
return false;
}
if (source != other.source) {
return false;
}
+ // OK
return true;
}
@@ -518,6 +522,7 @@ class AnalysisError {
builder.append("..");
builder.append(_offset + _length - 1);
builder.append("): ");
+ //builder.append("(" + lineNumber + ":" + columnNumber + "): ");
builder.append(_message);
return builder.toString();
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698