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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 8431008: Constructor parameters should have this.<field> reference elements set. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: whitespace Created 9 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index d30d11a4fdda2c447bb99bc4c48fd162116501cc..a80599b97c618c428c6b5167dad748c6f95d7893 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -1305,6 +1305,11 @@ public class Resolver {
// Field parameters are not visible as parameters, so we do not declare them
// in the context. Instead we record the resolved field element.
Elements.setParameterInitializerElement(parameter.getSymbol(), element);
+
+ // The editor expects the referenced elements to be non-null
+ DartPropertyAccess prop = (DartPropertyAccess)parameter.getName();
fabiomfv 2011/11/01 14:08:56 DBC - bear in mind that the parameter is not stric
codefu 2011/11/01 18:00:20 Double checked and everything looks good. All pre
+ prop.setReferencedElement(element);
+ prop.getName().setReferencedElement(element);
} else {
onError(parameter.getName(),
ResolverErrorCode.PARAMETER_INIT_OUTSIDE_CONSTRUCTOR);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698