[Mono-bugs] [Bug 400438] New: CS0840 error message does not make sense for indexers
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Jun 16 01:24:22 EDT 2008
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: mono-bugs at lists.ximian.com
ReportedBy: atsushi at ximian.com
QAContact: mono-bugs at lists.ximian.com
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; }
}
atsushi at PC ~/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.
More information about the mono-bugs
mailing list