Skip to content

yield-return decompiler failed #3400

@CreateAndInject

Description

@CreateAndInject

Original:

        public static IEnumerable<int> Enumerate()
        {
            for (int i = 0; i < 10; i++)
            {
                int result;
                try
                {
                    result = DateTime.Now.Second;
                }
                catch
                {
                    continue;
                }
                yield return result;
            }
        }

ILSpy:

[IteratorStateMachine(typeof(<Enumerate>d__1))]
public static IEnumerable<int> Enumerate()
{
	//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
	return new <Enumerate>d__1(-2);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDecompilerThe decompiler engine itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions