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 in removeStatement #1221

Closed
monperrus opened this issue Mar 13, 2017 · 0 comments
Closed

bug in removeStatement #1221

monperrus opened this issue Mar 13, 2017 · 0 comments
Labels

Comments

@monperrus
Copy link
Collaborator

monperrus commented Mar 13, 2017

In this example, if you want to remove the second i++ with block.removeStatement(block.getStatement(3));, Spoon removes the first one.

{  int i = 1;
    i++;
    if (i > 0) {
        java.lang.System.out.println("test");
    }
    i++;
}

(found by @martinezmatias thanks!)

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

No branches or pull requests

2 participants