How can we help you today? How can we help you today?

Simple (and verified) IL sequence causes crash on decompile

.method static object Foo(object obj)
{
    ldarg.0
    dup
    brtrue.s L1
    ret
L1:
    callvirt   instance class [mscorlib]System.Type [mscorlib]System.Object::GetType()
    ret
}

Selecting any language besides IL, will cause a crash in reflector. :roll:
leppie
0

Comments

2 comments

  • Clive Tong
    Thanks for reporting this. I'll add it to the bug tracking system.
    Clive Tong
    0
  • leppie
    While the code cannot be decompiled to any C# form, the dup opcode could be simulated with a store and load from a local.

    Perhaps, a message can be shown, that the code is functionally the same, but not a direct translation.
    leppie
    0

Add comment

Please sign in to leave a comment.