[Mono-bugs] [Bug 365188] New: gmcs generates invalid IL for creation of anonymous method
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Feb 27 08:38:04 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=365188
Summary: gmcs generates invalid IL for creation of anonymous
method
Product: Mono: Compilers
Version: SVN
Platform: x86-64
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: vargaz at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
As reported by somebody on mono-devel a while ago:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
public class Test
{
static public void TestFunc ()
{
return;
string testStr;
System.AppDomain.CurrentDomain.AssemblyLoad += delegate
(object Sender, System.AssemblyLoadEventArgs e)
{
testStr = "sss";
};
}
public static void Main (string[] args)
{
TestFunc ();
}
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Running the compiled code will fail with:
Unhandled Exception: System.InvalidProgramException: Invalid IL code in
Test:TestFunc (): IL_0024: ldc.i4.4
at Test.Main (System.String[] args) [0x00000]
This is because TestFunc () doesn't have a 'ret' at the end.
--
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.
More information about the mono-bugs
mailing list