[Mono-bugs] [Bug 399693] New: Anonymous methods not compiled correctly
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Jun 12 11:01:11 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=399693
Summary: Anonymous methods not compiled correctly
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: rkvinge at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=221810)
--> (https://bugzilla.novell.com/attachment.cgi?id=221810)
Test case
Compile attached test program and run.
Actual output:
Verdict:
Verdict: ZZ
Verdict: ZZ
Expected output:
Verdict: ZZ
ZZ
Verdict: ZZ
Verdict: ZZ
For the first anonymous method ("A") the generated code looks like:
[CompilerGenerated]
internal string <RegisterStringTagProvider>c__1(string tag)
{
string str;
return str;
}
For the second ("B") and third ("C)" anonymous method the generated code looks
exactly the same:
[CompilerGenerated]
internal string <RegisterStringTagProvider>c__5(string tag)
{
return T.Convert(tag);
}
The first line in "B" (the Console.WriteLine) is completely ignored.
Mono JIT compiler version 1.9 (/trunk/ r104989)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
--
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