Skip to content

increment operator in loop tests blocks decompilation of loops #9

@jurgenvinju

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;
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions