diff options
author | Martin Baulig <martin@novell.com> | 2007-03-29 14:57:57 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2007-03-29 14:57:57 +0400 |
commit | d86fb8380e825cfb3b7c6832bac058c1bf949a4b (patch) | |
tree | 63ff93242ce691b7228907c23128fd6dd5e76bd9 /mcs/tests/gtest-324.cs | |
parent | 0385be3ab1959b0aab0c6484faaa31b5037173ac (diff) |
2007-03-29 Martin Baulig <martin@ximian.com>
Fix #79148.
* anonymous.cs
(ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
CompilerGeneratedClass.
(ScopeInfo.EmitScopeInstance): Make this protected.
(CapturedVariable.EmitInstance): Use `Ldarg_0' if
`ec.CurrentAnonymousMethod.Scope == Scope'.
* statement.cs (Block.ScopeInfo): Make this a property.
svn path=/trunk/mcs/; revision=75127
Diffstat (limited to 'mcs/tests/gtest-324.cs')
-rwxr-xr-x | mcs/tests/gtest-324.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mcs/tests/gtest-324.cs b/mcs/tests/gtest-324.cs new file mode 100755 index 00000000000..c077524cb31 --- /dev/null +++ b/mcs/tests/gtest-324.cs @@ -0,0 +1,30 @@ +public delegate void A(); + +class B +{ + public static event A D; + long[] d = new long [1]; + + void C () + { + int a = 0; + int b = 0; + + A block = delegate { + long c = 0; + + B.D += delegate { + d [b] = c; + F (c); + }; + }; + } + + public void F (long i) + { + } + + static void Main () + { + } +} |