diff --git a/src/src/extension/PrimitiveExtension.cs b/src/src/extension/PrimitiveExtension.cs index c6acf2c..b008360 100644 --- a/src/src/extension/PrimitiveExtension.cs +++ b/src/src/extension/PrimitiveExtension.cs @@ -210,6 +210,10 @@ internal static (object Value, bool IsError) FromPrimitive(Type type, Primitive { value = primitive.Get.List(type); } + else if (type.IsValueType && !type.IsEnum && !type.IsPrimitive) + { + value = primitive.Get.Struct(type); + } else if (type.IsArray) { value = primitive.Get.Array(type); @@ -218,10 +222,6 @@ internal static (object Value, bool IsError) FromPrimitive(Type type, Primitive { value = primitive.Get.Class(type); } - else if (type.IsValueType && !type.IsEnum && !type.IsPrimitive) - { - value = primitive.Get.Struct(type); - } if (primitive.IsValid) return (value, value == null);