Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit a8a3391

Browse files
fix problem with captured/local variables in a generic context while debugging
1 parent 2f519da commit a8a3391

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/AddIns/Debugger/Debugger.Core/TypeSystemExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ public static IType GetLocalVariableType(this IMethod method, int index)
232232
{
233233
var info = GetInfo(method.ParentAssembly);
234234
var variableTypes = info.GetLocalVariableTypes(method.UnresolvedMember);
235-
return variableTypes[index].Resolve(new SimpleTypeResolveContext(method));
235+
return variableTypes[index]
236+
.Resolve(new SimpleTypeResolveContext(method))
237+
.AcceptVisitor(method.Substitution);
236238
}
237239
#endregion
238240

src/AddIns/DisplayBindings/ILSpyAddIn/ILSpySymbolSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public IEnumerable<ILLocalVariable> GetLocalVariables(IMethod method)
106106
return symbols.LocalVariables.Where(v => v.OriginalVariable != null).Select(
107107
v => new Debugger.ILLocalVariable() {
108108
Index = v.OriginalVariable.Index,
109-
Type = loader.ReadTypeReference(v.Type).Resolve(context),
109+
Type = loader.ReadTypeReference(v.Type).Resolve(context).AcceptVisitor(method.Substitution),
110110
Name = v.Name,
111111
IsCompilerGenerated = false,
112112
ILRanges = new [] { new ILRange(0, int.MaxValue) }

0 commit comments

Comments
 (0)