Model: Include type parameter constraints in generic class definition when finding referenced types (CS0246)

This commit is contained in:
Katy Coe
2019-11-29 02:46:42 +01:00
parent 0fe5fa53a6
commit 6e304ab7da

View File

@@ -731,6 +731,10 @@ namespace Il2CppInspector.Reflection {
refs.UnionWith(GenericTypeArguments);
refs.UnionWith(GetGenericParameterConstraints());
// Generic type constraints of type parameters in generic type definition
if (GenericTypeParameters != null)
refs.UnionWith(GenericTypeParameters.SelectMany(p => p.GetGenericParameterConstraints()));
// Implemented interfaces
refs.UnionWith(ImplementedInterfaces);