[nem-bug] [Nemerle 0000871]: Constant expression (1+1) is not treated as (2) in array rank specifier

feedback at nemerle.org feedback at nemerle.org
Mon Feb 5 17:36:29 CET 2007


The following issue has been REOPENED.
======================================================================
<http://nemerle.org/bugs/view.php?id=871> 
======================================================================
Reported By:                nikov
Assigned To:                nazgul
======================================================================
Project:                    Nemerle
Issue ID:                   871
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
======================================================================
Date Submitted:             02-05-2007 13:37 CET
Last Modified:              02-05-2007 17:36 CET
======================================================================
Summary:                    Constant expression (1+1) is not treated as (2) in
array rank specifier
Description: 
_ = array.[1+1][[1]]

does not work
======================================================================

----------------------------------------------------------------------
 nikov - 02-05-07 13:39 
----------------------------------------------------------------------
_ = array.[1 : int][]

also does not work

----------------------------------------------------------------------
 nazgul - 02-05-07 17:21 
----------------------------------------------------------------------
This is by design. Rank of array must be given by integer constant. 
Allowing anything different here would suggest that rank can be specified
dynamically, but it is not.

----------------------------------------------------------------------
 nikov - 02-05-07 17:36 
----------------------------------------------------------------------
Well, if the intention was to allow only integer literal here, I still do
not understand current behaviour.

_ = array.[1U][] // Integer literal, but does not work
_ = array.[(1)][] // Not a literal, but works

Issue History
Date Modified  Username       Field                    Change              
======================================================================
02-05-07 13:37 nikov          New Issue                                    
02-05-07 13:39 nikov          Note Added: 0001682                          
02-05-07 17:21 nazgul         Status                   new => resolved     
02-05-07 17:21 nazgul         Resolution               open => not an issue
02-05-07 17:21 nazgul         Assigned To               => nazgul          
02-05-07 17:21 nazgul         Note Added: 0001685                          
02-05-07 17:21 nazgul         Description Updated                          
02-05-07 17:36 nikov          Status                   resolved => feedback
02-05-07 17:36 nikov          Resolution               not an issue => reopened
02-05-07 17:36 nikov          Note Added: 0001687                          
======================================================================




More information about the bugs mailing list