Skip to content

Commit 3e6ed65

Browse files
authored
Fix name for enum keys in a map holding structs
When a map has enum as keys and any type of struct as values, the enum value that was used for the key would be replaced as if it was base class. As the VariableInformation class has a constructor that receives the names directly from the map, use that information to not allow the name override.
1 parent 0d820dc commit 3e6ed65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MIDebugEngine/Engine.Impl/Variables.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ private VariableInformation(TupleValue results, VariableInformation parent, stri
272272

273273
int index;
274274

275-
if (!results.Contains("value") && (Name == TypeName || Name.Contains("::")))
275+
if (name == null && !results.Contains("value") && (Name == TypeName || Name.Contains("::")))
276276
{
277277
// base classes show up with no value and exp==type
278278
// (sometimes underlying debugger does not follow this convention, when using typedefs in templated types so look for "::" in the field name too)

0 commit comments

Comments
 (0)