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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2165383002: Fix for local function element identifiers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/context/context_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/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index db740a8fddf1a89cde87a0cd045fcce4eff208a5..3a8c07fc0423334f5be5742a7d0b99e6f8de9a6f 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -4424,7 +4424,10 @@ class FunctionElementImpl extends ExecutableElementImpl
String get identifier {
String identifier = super.identifier;
if (!isStatic) {
- identifier += "@$nameOffset";
+ int enclosingOffset =
+ enclosingElement != null ? enclosingElement.nameOffset : 0;
+ int delta = nameOffset - enclosingOffset;
+ identifier += "@$delta";
}
return identifier;
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698