Skip to content

increment operator in loop tests blocks decompilation of loops #9

Description

@jurgenvinju

For example, this loop is not recognized because the condition is not rewritten first to an expression, since it has side-effects with the x++. Special cases have to be detected for expressions with increment side-effects.

int whileWithContinue(int x) {
	    while (x++ < 10) { 
	        if (x % 2 == 0) {
	            continue;
	        }
	        else {
	            println(x);
	        }
        }
        
        return x;
	}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions