mono struct return temporary variable not inlined #1555
Labels
C#
Decompiler
The decompiler engine itself
Enhancement
Areas for improvement
mcs
Problems with assemblies generated by the Mono compiler
Mono mcs seems to create a temporary variable when accessing fields in structs returned from calls (e.g.
getStruct().x
). This temporary variable is not inlined with recent ILSpy versions. It used to be inlined with ILSpy 2, but the currentIsGeneratedValueTypeTemporary
check prevents this.The variable is inlined when I add the following code at the top of
IsGeneratedValueTypeTemporary
, I don't know if that's a proper fix:For example for the following the class:
The
Do
method is compiled with mono to:And this is currently decompiled to:
monostructret.zip
The text was updated successfully, but these errors were encountered: