Browse Source
Fixed function so that expired variables do not throw exceptions git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@870 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
6 changed files with 136 additions and 15 deletions
@ -0,0 +1,39 @@ |
|||||||
|
// <file>
|
||||||
|
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
|
||||||
|
// <license see="prj:///doc/license.txt">GNU General Public License</license>
|
||||||
|
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
|
||||||
|
// <version>$Revision$</version>
|
||||||
|
// </file>
|
||||||
|
|
||||||
|
using System; |
||||||
|
|
||||||
|
#pragma warning disable 0219, 0414
|
||||||
|
|
||||||
|
namespace Debugger.Tests.TestPrograms |
||||||
|
{ |
||||||
|
public class FunctionVariablesLifetime |
||||||
|
{ |
||||||
|
public int @class = 3; |
||||||
|
|
||||||
|
public static void Main() |
||||||
|
{ |
||||||
|
new FunctionVariablesLifetime().Function(1); |
||||||
|
System.Diagnostics.Debugger.Break(); // 4
|
||||||
|
} |
||||||
|
|
||||||
|
void Function(int argument) |
||||||
|
{ |
||||||
|
int local = 2; |
||||||
|
System.Diagnostics.Debugger.Break(); // 1
|
||||||
|
SubFunction(); |
||||||
|
System.Diagnostics.Debugger.Break(); // 3
|
||||||
|
} |
||||||
|
|
||||||
|
void SubFunction() |
||||||
|
{ |
||||||
|
System.Diagnostics.Debugger.Break(); // 2
|
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
#pragma warning restore 0219, 0414
|
||||||
Loading…
Reference in new issue