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

Commit 4a80d3f

Browse files
fix bug in GetBackingFieldToken: virtual properties could be overridden therefore always call the getter method instead of looking for a backing field.
1 parent 10def64 commit 4a80d3f

File tree

1 file changed

+1
-0
lines changed
  • src/AddIns/Debugger/Debugger.Core

1 file changed

+1
-0
lines changed

src/AddIns/Debugger/Debugger.Core/Util.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public static bool HasStepOverAttribute(this IMethod method)
4343
/// <summary> Is this method in form 'return this.field;'? </summary>
4444
public static uint GetBackingFieldToken(this IMethod method)
4545
{
46+
if (method.IsVirtual || method.Parameters.Count != 0) return 0;
4647
return backingFieldToken.GetValue(method.UnresolvedMember, delegate {
4748
ICorDebugCode corCode;
4849
try {

0 commit comments

Comments
 (0)