From 4d227d6f1d3a6032bde52af47099471c38f22840 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Wed, 3 Oct 2018 17:52:31 -0500 Subject: [PATCH] Fix compat issue with Type.IsAssignableFrom --- src/System.Private.CoreLib/shared/System/Type.Helpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Private.CoreLib/shared/System/Type.Helpers.cs b/src/System.Private.CoreLib/shared/System/Type.Helpers.cs index 3de7d82..1d3c3b8 100644 --- a/src/System.Private.CoreLib/shared/System/Type.Helpers.cs +++ b/src/System.Private.CoreLib/shared/System/Type.Helpers.cs @@ -342,7 +342,7 @@ namespace System // For backward-compatibility, we need to special case for the types // whose UnderlyingSystemType are runtime implemented. Type toType = this.UnderlyingSystemType; - if (toType.IsRuntimeImplemented()) + if (toType?.IsRuntimeImplemented() == true) return toType.IsAssignableFrom(c); // If c is a subclass of this class, then c can be cast to this type. -- 2.7.4