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
using System; | |
using System.Runtime.Intrinsics; | |
using System.Runtime.Intrinsics.X86; | |
namespace CoreConsoleApp1 | |
{ | |
static class Program | |
{ | |
static void Main() | |
{ |
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
public readonly struct NullableDouble | |
{ | |
private readonly long value; | |
private NullableDouble(double value) | |
{ | |
var bits = BitConverter.DoubleToInt64Bits(value); | |
if (bits == -1) | |
{ | |
// the double passed in was NaN, but the pattern equals the pattern we use for NULL values, |
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
diff --git a/Src/Compilers/CSharp/Source/Lowering/LocalRewriter/LocalRewriter_Call.cs b/Src/Compilers/CSharp/Source/Lowering/LocalRewriter/LocalRewriter_Call.cs | |
index d356dec..3ad67f5 100644 | |
--- a/Src/Compilers/CSharp/Source/Lowering/LocalRewriter/LocalRewriter_Call.cs | |
+++ b/Src/Compilers/CSharp/Source/Lowering/LocalRewriter/LocalRewriter_Call.cs | |
@@ -130,6 +130,35 @@ namespace Microsoft.CodeAnalysis.CSharp | |
{ | |
Debug.Assert(node != null); | |
+ if (node.ReceiverOpt is BoundTypeOfOperator && node.Method.Name == "GetMethod" && !node.Method.IsExtensionMethod) | |
+ { |