From 7c566cbad17ed36c6c7bda789219d26a2d563822 Mon Sep 17 00:00:00 2001 From: JohanLarsson Date: Sat, 16 May 2020 10:16:13 +0200 Subject: [PATCH] Fix warning. --- ValidCode/Operators.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ValidCode/Operators.cs b/ValidCode/Operators.cs index d01edbdf..690cd07b 100644 --- a/ValidCode/Operators.cs +++ b/ValidCode/Operators.cs @@ -12,7 +12,7 @@ public void Valid() Assert.AreEqual(1, typeof(Operators).GetMethod("op_Addition", BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly, null, new[] { typeof(Operators), typeof(Operators) }, null).Invoke(null, new object?[] { null, null })); Assert.AreEqual(true, typeof(Operators).GetMethod("op_Equality", BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly, null, new[] { typeof(Operators), typeof(Operators) }, null).Invoke(null, new object?[] { null, null })); Assert.AreEqual(true, typeof(Operators).GetMethod("op_Inequality", BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly, null, new[] { typeof(Operators), typeof(Operators) }, null).Invoke(null, new object?[] { null, null })); - Assert.AreEqual(2, typeof(Operators).GetMethod("op_Explicit", BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly, null, new[] { typeof(Operators) }, null).Invoke(null, new object?[] { (Operators)null })); + Assert.AreEqual(2, typeof(Operators).GetMethod("op_Explicit", BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly, null, new[] { typeof(Operators) }, null).Invoke(null, new object?[] { (Operators?)null })); Assert.Null(typeof(Operators).GetMethod("op_Explicit", BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly, null, new[] { typeof(int) }, null).Invoke(null, new object[] { 1 })); }