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

Bug with setVisibility when cloning a method #726

Closed
seintur opened this issue Jun 26, 2016 · 2 comments
Closed

Bug with setVisibility when cloning a method #726

seintur opened this issue Jun 26, 2016 · 2 comments

Comments

@seintur
Copy link
Contributor

seintur commented Jun 26, 2016

Dear spooners,

When cloning a method and setting the visibility of the clone, the visibility is also modified on the original method. It looks like the original and the clone are entangled and share the same visibility.

The spoon.test.method.MethodTest#testClone test in the branch https://github.com/seintur/spoon/tree/ctmethodclone_bug illustrates the issue.

Lionel.

@GerardPaligot
Copy link
Contributor

The bug occurs even with your second commit seintur@b42ebf3?

@seintur
Copy link
Contributor Author

seintur commented Jun 26, 2016

Yes, you can try.

My guess is that the set of modifiers is not copied when cloning the method, just referenced in the clone as it is in the original method.

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