fix: corrected IEquatable implementation check (#362)

This commit is contained in:
Soraphis 2022-10-23 23:03:20 +02:00 committed by GitHub
parent bc2a68527f
commit 9cf1b60a06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ namespace UnityAtoms.Editor
{ {
var type = Type.GetType($"{FullQualifiedName}"); var type = Type.GetType($"{FullQualifiedName}");
if (type == null) throw new TypeLoadException($"Type could not be found ({FullQualifiedName})"); if (type == null) throw new TypeLoadException($"Type could not be found ({FullQualifiedName})");
var isValueTypeEquatable = type.GetInterfaces().Contains(typeof(IEquatable<>)); var isValueTypeEquatable = typeof(IEquatable<>).MakeGenericType(type).IsAssignableFrom(type);
var baseTypeAccordingNested = type.FullName.Replace('+', '.'); var baseTypeAccordingNested = type.FullName.Replace('+', '.');