Browse Source

Fix this for static methods.

pull/191/merge
Eusebiu Marcu 16 years ago
parent
commit
4c1ed5353f
  1. 5
      Debugger/Debugger.Core/NRefactory/Visitors/ExpressionEvaluator.cs

5
Debugger/Debugger.Core/NRefactory/Visitors/ExpressionEvaluator.cs

@ -572,8 +572,13 @@ namespace ICSharpCode.NRefactory.Visitors
TypedValue GetThisValue() TypedValue GetThisValue()
{ {
try {
// This is needed so that captured 'this' is supported // This is needed so that captured 'this' is supported
return new TypedValue(context.GetThisValue(), (DebugType)context.MethodInfo.DeclaringType); return new TypedValue(context.GetThisValue(), (DebugType)context.MethodInfo.DeclaringType);
} catch (GetValueException) {
// static method
return null;
}
} }
public override object VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, object data) public override object VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, object data)

Loading…
Cancel
Save