[Mono-bugs] [Bug 78601][Nor] New - Error CS0120 often reports only
last part of method signature
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Jun 7 10:40:46 EDT 2006
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 juraj at hotfeet.ch.
http://bugzilla.ximian.com/show_bug.cgi?id=78601
--- shadow/78601 2006-06-07 10:40:46.000000000 -0400
+++ shadow/78601.tmp.31480 2006-06-07 10:40:46.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 78601
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details: FC5
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: juraj at hotfeet.ch
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: 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
+
+Clearly the quoted method signature has been truncated.
+
+======================
+using System.Text;
+
+class X {
+ static void Main () {
+ X.Y(null);
+ }
+
+ void Y(StringBuilder someParam) {
+ }
+}
+======================
+
+The problem is the following statement in
+SimpleName.Error_ObjectRefRequired (...) (in ecore.cs):
+
+if (name.LastIndexOf ('.') > 0)
+ name = name.Substring (name.LastIndexOf ('.') + 1);
+
+This cuts away anything before the last dot.
More information about the mono-bugs
mailing list