[nem-bug] [Nemerle 0000627]: Increment in aggument
feedback at nemerle.org
feedback at nemerle.org
Sun Feb 26 14:31:10 CET 2006
A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=627>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 627
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 02-26-2006 04:33 CET
Last Modified: 02-26-2006 14:31 CET
======================================================================
Summary: Increment in aggument
Description:
This example:
[code]
using System.Console;
mutable x = 0;
WriteLine("-- {0} --", x++);
WriteLine("-- {0} --", ++x);
[/code]
print:
-- --
-- --
But must print:
-- 0 --
-- 2 --
======================================================================
----------------------------------------------------------------------
steffen - 02-26-06 11:08
----------------------------------------------------------------------
The increment and decrement operators return a void in nemerle.
You however can use something like:
WriteLine("-- {0} --", {x++; x});
----------------------------------------------------------------------
VladD2 - 02-26-06 14:31
----------------------------------------------------------------------
> The increment and decrement operators return a void in nemerle.
1. This is not logical.
2. The compiler should report error message since void-value was put into
parameter of a method.
Issue History
Date Modified Username Field Change
======================================================================
02-26-06 04:33 VladD2 New Issue
02-26-06 11:08 steffen Note Added: 0001109
02-26-06 14:31 VladD2 Note Added: 0001110
======================================================================
More information about the bugs
mailing list