https://bugzilla.novell.com/show_bug.cgi?id=400438


           Summary: CS0840 error message does not make sense for indexers
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: ---


The following sample shows that CS0840 message does not make sense for
indexers:

$ cat indexer-auto.cs
class Test
{
        public string this [string key] { get; set; }
}


[EMAIL PROTECTED] ~/tests/linq
$ gmcs indexer-auto.cs
indexer-auto.cs(3,43): error CS0840: `Test.this[string].get' must have a body
because it is not marked abstract or extern. The property can be automatically
implemented when you define both accessors
indexer-auto.cs(3,48): error CS0840: `Test.this[string].set' must have a body
because it is not marked abstract or extern. The property can be automatically
implemented when you define both accessors
Compilation failed: 2 error(s), 0 warnings


The truth is, the property cannot be automatically implemented.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to