From fc83a47d89294f7a294c2a2eb6879b3291a11ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Wed, 16 Jul 2025 10:46:36 +0100 Subject: [PATCH] Fix output locals in dump - Now outputs value types correctly. --- MetadataProcessor.Shared/nanoDumperGenerator.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/MetadataProcessor.Shared/nanoDumperGenerator.cs b/MetadataProcessor.Shared/nanoDumperGenerator.cs index 9cc510b..053cbe5 100644 --- a/MetadataProcessor.Shared/nanoDumperGenerator.cs +++ b/MetadataProcessor.Shared/nanoDumperGenerator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; @@ -853,7 +853,14 @@ private string PrintSignatureForLocalVar(Collection variable } else if (l.VariableType.IsGenericInstance) { - sig.Append($"class {l.VariableType.FullName}"); + if (l.VariableType.IsValueType) + { + sig.Append($"valuetype {l.VariableType.FullName}"); + } + else + { + sig.Append($"class {l.VariableType.FullName}"); + } _tablesContext.TypeSpecificationsTable.TryGetTypeReferenceId(l.VariableType as TypeSpecification, out ushort referenceId);