From b8bb5492256162e8d83523f33152c3d85c82f523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Wed, 5 Nov 2025 19:18:27 +0000 Subject: [PATCH] Processing types to get TypeSpecs now collects generic instance variables --- .../Tables/nanoTypeSpecificationsTable.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MetadataProcessor.Shared/Tables/nanoTypeSpecificationsTable.cs b/MetadataProcessor.Shared/Tables/nanoTypeSpecificationsTable.cs index a3641ce..68c5c83 100644 --- a/MetadataProcessor.Shared/Tables/nanoTypeSpecificationsTable.cs +++ b/MetadataProcessor.Shared/Tables/nanoTypeSpecificationsTable.cs @@ -298,6 +298,11 @@ private void FillTypeSpecsFromTypes() foreach (MethodDefinition m in td.Methods.Where(m => m.HasBody)) { + foreach (VariableDefinition variable in m.Body.Variables) + { + ExpandNestedTypeSpecs(variable.VariableType); + } + foreach (Instruction instr in m.Body.Instructions) { if (instr.Operand is GenericInstanceMethod genericInstanceMethod) @@ -399,6 +404,9 @@ private void ExpandNestedTypeSpecs(TypeReference t) ExpandNestedTypeSpecs(arg); } + ushort declId = _context.SignaturesTable.GetOrCreateSignatureId(git); + AddIfNew(git, declId); + break; case ArrayType at: