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=78601 --- shadow/78601 2006-06-07 11:29:33.000000000 -0400 +++ shadow/78601.tmp.31089 2006-06-15 05:25:15.000000000 -0400 @@ -5,18 +5,17 @@ OS Details: FC5 Status: NEW Resolution: Severity: Unknown Priority: Normal Component: C# -AssignedTo: [EMAIL PROTECTED] +AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- URL: -Cc: Summary: [PATCH] Error CS0120 often reports only last part of method signature The error message resulting from compiling the code below is test.cs(5,3): error CS0120: `StringBuilder)': An object reference is required for the nonstatic field, method or property @@ -51,6 +50,40 @@ thing to do. ------- Additional Comments From [EMAIL PROTECTED] 2006-06-07 11:01 ------- Created an attachment (id=17152) Proposed patch + +------- Additional Comments From [EMAIL PROTECTED] 2006-06-08 05:38 ------- +Hmm, while this fixes the problem for this case, we need to handle the +short-name case for other callsites. + +A grep shows the callsites as + +------------------------------------ +ecore.cs:2050: Error_ObjectRefRequired (ec, loc, +me.GetSignatureForError ()); +ecore.cs:2446: SimpleName.Error_ObjectRefRequired (ec, loc, +GetSignatureForError ()); +ecore.cs:2472: SimpleName.Error_ObjectRefRequired (ec, loc, Name); +ecore.cs:2780: SimpleName.Error_ObjectRefRequired (ec, loc, +FieldInfo.Name); +ecore.cs:3268: SimpleName.Error_ObjectRefRequired (ec, loc, +PropertyInfo.Name); +ecore.cs:3601: SimpleName.Error_ObjectRefRequired (ec, loc, +EventInfo.Name); +expression.cs:4740: SimpleName.Error_ObjectRefRequired (ec, loc, +TypeManager.CSharpSignature (mi)); +expression.cs:5016: SimpleName.Error_ObjectRefRequired (ec, loc, +TypeManager.CSharpSignature (method)); +----------------------------------- + +Note the cases where .Name is used. I think those cases have to be +fixed to pass short names. + +If you're interested in fixing the issue, please assign the bug to +yourself (Cc:ing me). + +------- Additional Comments From [EMAIL PROTECTED] 2006-06-15 05:25 ------- +Sorry, didn't see your comment until now. I'll look at the other +callsites. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
