Fix not running hooks when copying non-byref data definition fields without a custom serializer (#4324)

This commit is contained in:
DrSmugleaf
2023-08-26 15:20:46 -07:00
committed by GitHub
parent b6c8060af1
commit aeeaaaefc5
2 changed files with 1 additions and 32 deletions

View File

@@ -286,23 +286,6 @@ internal static class Types
return true;
}
internal static bool HasEmptyPublicConstructor(ITypeSymbol type)
{
if (type is not INamedTypeSymbol named)
return false;
foreach (var constructor in named.InstanceConstructors)
{
if (constructor.DeclaredAccessibility == Accessibility.Public &&
constructor.Parameters.Length == 0)
{
return true;
}
}
return false;
}
internal static bool IsVirtualClass(ITypeSymbol type)
{
return type.IsReferenceType && !type.IsSealed && type.TypeKind != TypeKind.Interface;