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

'for' loops decompiled wrong #4

Closed
itaibh opened this issue Feb 17, 2011 · 2 comments
Closed

'for' loops decompiled wrong #4

itaibh opened this issue Feb 17, 2011 · 2 comments

Comments

@itaibh
Copy link

itaibh commented Feb 17, 2011

The decompiled version of this:

    public void ForLoopTest()
    {
        for (int i = 0; i < 100; ++i)
        {
            DoSomething();
        }
    }

is this:

public void ForLoopTest()
{
for (int i = 0; ; )
{
if (i >= 100) // should be placed after first semicolon
{
break;
}
else
{
this.DoSomething(); // redundant 'this.'
i += 1; // can be changed to ++i or i++ and placed after second semicolon
}
}
}

@dsrbecky
Copy link
Member

It is correct, just not nice. It is the one the top items on my TODO list.

@dgrunwald
Copy link
Member

Add pattern for "for" loops. Closed by d5dcfea.

pgourlain pushed a commit to pgourlain/ILSpy that referenced this issue Apr 15, 2014
Handle failed TypeInference for ILCode.Shr
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants