Browse Source

Fix this for static methods.

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

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

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

Loading…
Cancel
Save