[nem-bug] [Nemerle 0000700]: [0.9.3] Unable to specify concrete type for array literals

feedback at nemerle.org feedback at nemerle.org
Sat Jul 1 21:25:45 CEST 2006


The following issue has been CLOSED
======================================================================
<http://nemerle.org/bugs/view.php?id=700> 
======================================================================
Reported By:                Snaury
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   700
Category:                   Compiler
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
======================================================================
Date Submitted:             07-01-2006 15:58 CEST
Last Modified:              07-01-2006 21:25 CEST
======================================================================
Summary:                    [0.9.3] Unable to specify concrete type for array
literals
Description: 
cs2n transtes C# construct:

  object[] arr = new object[]{ 1, 2, 3 };

into:

  mutable arr = array[ 1, 2, 3 ];

Which in fact produces array of int, not array of object (and it is
impossible to convert such an array to array of object). No matter what I
tried, there was no way to specify type for array, and actually looking at
the source code I can see that there is indeed no such construct, which
makes it impossible to use array literals in certain situations...
======================================================================

----------------------------------------------------------------------
 nazgul - 07-01-06 21:25 
----------------------------------------------------------------------
Use:

array [1 : object, 2, 3]

Issue History
Date Modified  Username       Field                    Change              
======================================================================
07-01-06 15:58 Snaury         New Issue                                    
07-01-06 21:25 nazgul         Status                   new => closed       
07-01-06 21:25 nazgul         Note Added: 0001330                          
======================================================================




More information about the bugs mailing list