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

Unified Diff: pkg/compiler/lib/src/dart_backend/placeholder_collector.dart

Issue 787603003: Generative constructors in the new dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 6 years 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
Index: pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
diff --git a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
index 2b98939b1390dde257d3a52d36c1612da639ab46..c4031193d21ba30d6727bf34c42f21574872a1f4 100644
--- a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
+++ b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
@@ -619,12 +619,14 @@ class PlaceholderCollector extends Visitor {
id != null && Keyword.keywords[id.source] != null;
Element element = treeElements[node];
- // May get null here in case of A(int this.f());
+ // May get null;
if (element != null) {
tryMakePrivateIdentifier(node.name, element);
// Rename only local functions.
- if (topmostEnclosingFunction == null) {
+ if (topmostEnclosingFunction == null &&
+ element is! LocalParameterElement &&
+ element is! InitializingFormalElement) {
topmostEnclosingFunction = element;
}
if (!identical(element, currentElement)) {

Powered by Google App Engine
This is Rietveld 408576698