[Mono-bugs] [Bug 76598][Blo] New - Compiler fails on accessing indexed properties

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Oct 30 10:40:18 EST 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 di at ufgo.org.

http://bugzilla.ximian.com/show_bug.cgi?id=76598

--- shadow/76598	2005-10-30 10:40:18.000000000 -0500
+++ shadow/76598.tmp.9599	2005-10-30 10:40:18.000000000 -0500
@@ -0,0 +1,54 @@
+Bug#: 76598
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: di at ufgo.org               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Compiler fails on accessing indexed properties
+
+Description of Problem:
+
+Compiler fails on accessing indexed properties.
+
+Code:
+ TestClass.set_SomeProp(0, Value);
+compiler error
+error CS0571: `SomeClass.this[short].set': cannot explicitly call operator
+or accessor
+
+IL code of set_SomeProp:
+
+.method public hidebysig specialname instance void 
+        set_SomeProp(int16 Index, bool 'value') cil managed
+{
+  // Code size       9 (0x9)
+  .maxstack  3
+  IL_0000:  ldarg.0
+  IL_0001:  ldarg.1
+  IL_0002:  ldarg.2
+  IL_0003:  call       instance void TestClass::SetSomeProp(int16,        
+                                                                  bool) 
+  IL_0008:  ret
+} // end of method TestClass::set_CipherSuites
+
+
+Look's like problem in:
+mcs/mcs/expression.cs
+in method IsSpecialMethodInvocation 
+--
+  else if (method.Name.StartsWith ("set_") && args > 2)
+		return false;
+--
+imho should be "args > 1"
+
+P.S. Mono version 1.1.9.2


More information about the mono-bugs mailing list