Model: Fix DeclaringType doesn't work for concrete generic instances from TypeSpecs

This commit is contained in:
Katy Coe
2020-02-02 22:40:28 +01:00
parent 9ba0498d9b
commit 07a956f07e

View File

@@ -693,6 +693,9 @@ namespace Il2CppInspector.Reflection {
// Same visibility attributes as generic type definition // Same visibility attributes as generic type definition
Attributes = genericTypeDefinition.Attributes; Attributes = genericTypeDefinition.Attributes;
// Even though this isn't a TypeDef, we have to set this so that DeclaringType works in later references
Index = genericTypeDefinition.Index;
// Same name as generic type definition // Same name as generic type definition
Assembly = genericTypeDefinition.Assembly; Assembly = genericTypeDefinition.Assembly;
Namespace = genericTypeDefinition.Namespace; Namespace = genericTypeDefinition.Namespace;