mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 03:26:39 +00:00
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:
parent
ec78d3fce6
commit
b32b5ceb7f
|
@ -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();
|
||||
prop.setReferencedElement(element);
|
||||
prop.getName().setReferencedElement(element);
|
||||
} else {
|
||||
onError(parameter.getName(),
|
||||
ResolverErrorCode.PARAMETER_INIT_OUTSIDE_CONSTRUCTOR);
|
||||
|
|
Loading…
Reference in a new issue