Просмотр исходного кода

Merge pull request #1731 from disarray2077/patch-4

Fix IsSubtypeOf with TypedPrimitive parameter
Brian Fiete 3 лет назад
Родитель
Сommit
cf9aa7012c
1 измененных файлов с 1 добавлено и 1 удалено
  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)