From 6e304ab7da45bcf14c9eb7fb57960e2377cfa618 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Fri, 29 Nov 2019 02:46:42 +0100 Subject: [PATCH] Model: Include type parameter constraints in generic class definition when finding referenced types (CS0246) --- Il2CppInspector/Reflection/TypeInfo.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Il2CppInspector/Reflection/TypeInfo.cs b/Il2CppInspector/Reflection/TypeInfo.cs index 685058a..4a9077a 100644 --- a/Il2CppInspector/Reflection/TypeInfo.cs +++ b/Il2CppInspector/Reflection/TypeInfo.cs @@ -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);