[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:50:55 CET 2007
The following issue has been CLOSED
======================================================================
<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: closed
Resolution: reopened
Fixed in Version:
======================================================================
Date Submitted: 02-05-2007 13:37 CET
Last Modified: 02-05-2007 17:50 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
----------------------------------------------------------------------
nazgul - 02-05-07 17:40
----------------------------------------------------------------------
I mean: plain simple integer, not the unsigned integer literal.
(EXPR) is dumped to EXPR by parser, so as you noticed before Nemerle
treats (EXPR) the same as EXPR in most places (the exception is e.g. in
function call, where it make a difference)
----------------------------------------------------------------------
nikov - 02-05-07 17:45
----------------------------------------------------------------------
Ok, I understand. Closed.
----------------------------------------------------------------------
nazgul - 02-05-07 17:50
----------------------------------------------------------------------
So close.
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
02-05-07 17:36 nikov Description Updated
02-05-07 17:40 nazgul Note Added: 0001689
02-05-07 17:45 nikov Note Added: 0001690
02-05-07 17:45 nikov Note Edited: 0001690
02-05-07 17:50 nazgul Status feedback => closed
02-05-07 17:50 nazgul Note Added: 0001691
======================================================================
More information about the bugs
mailing list