mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
VB's `New Long()` is emitted as `initobj` whereas C#'s `default(long)` is emitted as `ldc.i4.0; conv.i8`.pull/1914/head
5 changed files with 27 additions and 1 deletions
@ -0,0 +1,9 @@ |
|||||||
|
using System; |
||||||
|
|
||||||
|
public class Issue1906 |
||||||
|
{ |
||||||
|
public void M() |
||||||
|
{ |
||||||
|
Console.WriteLine(Math.Min(Math.Max(long.MinValue, default(long)), long.MaxValue)); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,6 @@ |
|||||||
|
Imports System |
||||||
|
Public Class Issue1906 |
||||||
|
Public Sub M() |
||||||
|
Console.WriteLine(Math.Min(Math.Max(Int64.MinValue, New Long), Int64.MaxValue)) |
||||||
|
End Sub |
||||||
|
End Class |
Loading…
Reference in new issue