Dedup param, array and byref/pointer types
We're aiming to make TypeInfo instances unique - no two TypeInfo instances within a given model should refer to the same type. This will allow us to use simple reference equality for comparing types.
This commit is contained in:
@@ -104,8 +104,8 @@ namespace Il2CppInspector.Reflection
|
||||
|
||||
// Store the generic type parameters for later instantiation
|
||||
var container = pkg.GenericContainers[Definition.genericContainerIndex];
|
||||
|
||||
genericArguments = pkg.GenericParameters.Skip((int)container.genericParameterStart).Take(container.type_argc).Select(p => new TypeInfo(this, p)).ToArray();
|
||||
genericArguments = Enumerable.Range((int)container.genericParameterStart, container.type_argc)
|
||||
.Select(index => Assembly.Model.GetGenericParameterType(index)).ToArray();
|
||||
}
|
||||
|
||||
// Set method attributes
|
||||
|
||||
Reference in New Issue
Block a user