https://bugzilla.novell.com/show_bug.cgi?id=649448
https://bugzilla.novell.com/show_bug.cgi?id=649448#c0 Summary: REGRESSION: labels inside of delegates defined as a method argument cannot be resolved Classification: Mono Product: Mono: Compilers Version: 2.8.x Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Customer Blocker: --- Consider the following: namespace TestGotoLabels { class GotoLabelsTest { public delegate void MyDelegate(); #if BROKE public void TestMethod() { TestMethod2( delegate() { goto outLabel; outLabel: System.Environment.Exit(0); }); } #endif #if WORKS public void TestMethod() { MyDelegate md = delegate() { goto outLabel; outLabel: System.Environment.Exit(0); }; TestMethod2(md); } #endif public static void TestMethod2(MyDelegate md) { md.Invoke(); } } } mcs -t:library -d:BROKE gtest.cs gtest.cs(11,16): error CS0159: The label `outLabel:' could not be found within the scope of the goto statement gtest.cs(12,12): warning CS0162: Unreachable code detected Compilation failed: 1 error(s), 1 warnings Defining the WORKS symbol causes compilation to succeed. The BROKE code appears to work in 2.4.4 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
