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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=75283 --- shadow/75283 2005-06-16 10:52:51.000000000 -0400 +++ shadow/75283.tmp.31834 2005-06-16 10:52:51.000000000 -0400 @@ -0,0 +1,40 @@ +Bug#: 75283 +Product: Mono: Compilers +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Minor +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: instance variable with same name as class sometimes treated as static + +The following program: + + using System.Collections; + + public class Test { + + ArrayList ArrayList; + + public static void Main () { + ArrayList.Capacity = 5; + } + } + +compiles fine (with mcs, not csc), but gives an error when run: + + ** ERROR **: Invalid IL code at IL0000 in Test:Main (): IL_0000: +ldfld 0x04000001 + +This only happens if the field has the same name as the base name +of its type, and if you're "using" the type's namespace. Otherwise +it correctly tells you "An object reference is required for the +non-static field ..." _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
