[Mono-bugs] [Bug 76009][Wis] New - Using yield produces classes
with duplicate field names.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Sep 7 08:48:22 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by eyala at mainsoft.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76009
--- shadow/76009 2005-09-07 08:48:22.000000000 -0400
+++ shadow/76009.tmp.23387 2005-09-07 08:48:22.000000000 -0400
@@ -0,0 +1,28 @@
+Bug#: 76009
+Product: Mono: Compilers
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: eyala at mainsoft.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Using yield produces classes with duplicate field names.
+
+When using the new C# 20 keyword yield in an IEnumerable fields with
+duplicate names are created within the auto-generated yield class if local
+variables using the same name are defined in several places within the
+method.
+It appears that the algorithm simply adds a field for every local variable
+using the local variable name. If a name is used for a local variable more
+then once then several fields using the same name will be created.
+Using the attached program, once compiled into a DLL you can see using
+ildasm that '<ff>__' has two fields call 'i'. Trying to ilasm the code
+generated by ildasm will fail.
More information about the mono-bugs
mailing list