Browse Source

Merge pull request #1731 from disarray2077/patch-4

Fix IsSubtypeOf with TypedPrimitive parameter
Brian Fiete 3 years ago
parent
commit
cf9aa7012c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      BeefLibs/corlib/src/Type.bf

+ 1 - 1
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<FieldInfo> GetField(String fieldName)