Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Fix compat issue with Type.IsAssignableFrom
Browse files Browse the repository at this point in the history
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
  • Loading branch information
steveharter authored and jkotas committed Oct 4, 2018
1 parent d4e9306 commit f420707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common/src/CoreLib/System/Type.Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public virtual bool IsAssignableFrom(Type c)
// 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.
Expand Down

0 comments on commit f420707

Please sign in to comment.