Constructor parameters should have this.<field> reference elements set.

R=brianwilkerson@google.com,mmendez
BUG=
TEST=

Review URL: http://codereview.chromium.org//8431008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1043 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
codefu@google.com 2011-11-01 21:55:16 +00:00
parent ec78d3fce6
commit b32b5ceb7f

View file

@ -1305,6 +1305,11 @@ public class Resolver {
// Field parameters are not visible as parameters, so we do not declare them // Field parameters are not visible as parameters, so we do not declare them
// in the context. Instead we record the resolved field element. // in the context. Instead we record the resolved field element.
Elements.setParameterInitializerElement(parameter.getSymbol(), element); Elements.setParameterInitializerElement(parameter.getSymbol(), element);
// The editor expects the referenced elements to be non-null
DartPropertyAccess prop = (DartPropertyAccess)parameter.getName();
prop.setReferencedElement(element);
prop.getName().setReferencedElement(element);
} else { } else {
onError(parameter.getName(), onError(parameter.getName(),
ResolverErrorCode.PARAMETER_INIT_OUTSIDE_CONSTRUCTOR); ResolverErrorCode.PARAMETER_INIT_OUTSIDE_CONSTRUCTOR);