Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1906: RRs for default expressions of primitive types should use …
…the correct constant value. VB's `New Long()` is emitted as `initobj` whereas C#'s `default(long)` is emitted as `ldc.i4.0; conv.i8`.
- Loading branch information
1 parent
91425e8
commit 6973dec
Showing
5 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System; | ||
|
||
public class Issue1906 | ||
{ | ||
public void M() | ||
{ | ||
Console.WriteLine(Math.Min(Math.Max(long.MinValue, default(long)), long.MaxValue)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters