From 394bcd82d31b1948ebd4dc2238281dec22c0884e Mon Sep 17 00:00:00 2001 From: disarray2077 <86157825+disarray2077@users.noreply.github.com> Date: Thu, 6 Oct 2022 11:50:20 -0300 Subject: [PATCH] Fix IsSubtypeOf with TypedPrimitive parameter --- BeefLibs/corlib/src/Type.bf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeefLibs/corlib/src/Type.bf b/BeefLibs/corlib/src/Type.bf index 0420a43d..15263972 100644 --- a/BeefLibs/corlib/src/Type.bf +++ b/BeefLibs/corlib/src/Type.bf @@ -630,7 +630,7 @@ namespace System public virtual bool IsSubtypeOf(Type type) { - return type == this; + return type == this || (type.IsTypedPrimitive && type.UnderlyingType == this); } public virtual Result GetField(String fieldName)