Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dartc build failure: private DartNode.setParent() #10

Closed
DartBot opened this issue Oct 10, 2011 · 7 comments
Closed

dartc build failure: private DartNode.setParent() #10

DartBot opened this issue Oct 10, 2011 · 7 comments

Comments

@DartBot
Copy link

DartBot commented Oct 10, 2011

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. build dart compiler

What is the expected output? What do you see instead?
dart/compiler/java/com/google/dart/compiler/ast/DartNode.java fails to compile with the following error:
    [javac] /data/down/devel/dart/dart/compiler/java/com/google/dart/compiler/ast/DartNode.java:122: error: setParent(DartNode) has private access in DartNode
    [javac] child.setParent(this);
    [javac] ^

What version of the product are you using? On what operating system?
dart svn, javac 1.7.0 on arch linux

Please provide any additional information below.
Making setParent() protected instead of private fixes the issue for me, allowing it to be called from protected method becomeParentOf() of the same class.

@dgrove
Copy link
Contributor

dgrove commented Oct 11, 2011

Added Area-Compiler label.

@DartBot
Copy link
Author

DartBot commented Oct 11, 2011

This comment was originally written by [email protected]


Set owner to [email protected].

@DartBot
Copy link
Author

DartBot commented Oct 11, 2011

This comment was originally written by [email protected]


Added Accepted label.

@DartBot
Copy link
Author

DartBot commented Oct 12, 2011

This comment was originally written by [email protected]


the correct way to fix it is to write:
  ((DartNode)child).setParent(this);

It's avoid to change the visibility of setParent.

@DartBot
Copy link
Author

DartBot commented Oct 17, 2011

This comment was originally written by [email protected]


Should be fixed at r471


Set owner to [email protected].

@DartBot
Copy link
Author

DartBot commented Oct 17, 2011

This comment was originally written by [email protected]


The fix works for me.

@DartBot
Copy link
Author

DartBot commented Oct 17, 2011

This comment was originally written by [email protected]


Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants