Skip to content

Commit f6a67bf

Browse files
authored
Processing types to get TypeSpecs now collects generic instance variable (#215)
***NO_CI***
1 parent ec2e978 commit f6a67bf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

MetadataProcessor.Shared/Tables/nanoTypeSpecificationsTable.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ private void FillTypeSpecsFromTypes()
298298

299299
foreach (MethodDefinition m in td.Methods.Where(m => m.HasBody))
300300
{
301+
foreach (VariableDefinition variable in m.Body.Variables)
302+
{
303+
ExpandNestedTypeSpecs(variable.VariableType);
304+
}
305+
301306
foreach (Instruction instr in m.Body.Instructions)
302307
{
303308
if (instr.Operand is GenericInstanceMethod genericInstanceMethod)
@@ -399,6 +404,9 @@ private void ExpandNestedTypeSpecs(TypeReference t)
399404
ExpandNestedTypeSpecs(arg);
400405
}
401406

407+
ushort declId = _context.SignaturesTable.GetOrCreateSignatureId(git);
408+
AddIfNew(git, declId);
409+
402410
break;
403411

404412
case ArrayType at:

0 commit comments

Comments
 (0)