Closed 1zaboy closed 2 days ago
Version Used: .net 8
Steps to Reproduce:
I have method
public static void RecordError(Exception exception) { }
And I have code witch call RecordError
try { ... } catch (Exception ex) { O.RecordError(ex); }
But when I build it and check Asm, I see call [Test.O:RecordError(System.Exception)] in asm
Since the method does not contain any code, its call could be removed.
I use .net 8 and Disasmo for see asm
Expected Behavior: not call method
Actual Behavior: call method
Are you compiling Debug or Release?
Roslyn does not produce asm. We produce IL. The runtime converts that IL to asm using the AOT or Jit compilers. So this is a question for dotnet/runtime.
@vladd Release
Version Used: .net 8
Steps to Reproduce:
I have method
And I have code witch call RecordError
But when I build it and check Asm, I see call [Test.O:RecordError(System.Exception)] in asm
Since the method does not contain any code, its call could be removed.
I use .net 8 and Disasmo for see asm
Expected Behavior: not call method
Actual Behavior: call method