[nem-bug] [Nemerle 0000814]: Nemerle default indexer not
compatibility with C#
feedback at nemerle.org
feedback at nemerle.org
Wed Dec 27 23:59:50 CET 2006
The following issue has been CONFIRMED.
======================================================================
<http://nemerle.org/bugs/view.php?id=814>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 814
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: confirmed
======================================================================
Date Submitted: 12-27-2006 05:06 CET
Last Modified: 12-27-2006 23:59 CET
======================================================================
Summary: Nemerle default indexer not compatibility with C#
Description:
If create in Nemerle assembly which containe type with default accessor:
public Item[fileIndex : int] : SomeType
{
get
{
...
}
}
and try use it from C# application you get error:
error CS0570: 'Nemerle.Completion2.CompileUnitCollection.this[int]' is not
supported by the language
======================================================================
----------------------------------------------------------------------
malekith - 12-27-06 09:59
----------------------------------------------------------------------
It works for me. Moreover the generated IL seems to be *exactly* the same
as in C# (using gmcs). Could you provide a self-contained example?
----------------------------------------------------------------------
VladD2 - 12-27-06 14:32
----------------------------------------------------------------------
Please, see rev. 7158.
The indexer for CompileUnits defined in
Nemerle.VSIP\Nemerle.Compiler.Utils\Nemerle.Completion2\CodeModel\CompileUnitCollection.n
(line 40).
----------------------------------------------------------------------
nazgul - 12-27-06 23:59
----------------------------------------------------------------------
public class X {
public Item [x : int] : string { get { x.ToString () } }
public Item [x : string] : string { get { x } }
}
Looks like we emit two DefaultMember attributes instead of one.
Issue History
Date Modified Username Field Change
======================================================================
12-27-06 05:06 VladD2 New Issue
12-27-06 09:59 malekith Note Added: 0001588
12-27-06 09:59 malekith Status new => feedback
12-27-06 09:59 malekith Description Updated
12-27-06 14:32 VladD2 Note Added: 0001589
12-27-06 23:59 nazgul Note Added: 0001591
12-27-06 23:59 nazgul Status feedback => confirmed
12-27-06 23:59 nazgul Description Updated
======================================================================
More information about the bugs
mailing list