[nem-bug] [Nemerle 0000779]: String concatination
feedback at nemerle.org
feedback at nemerle.org
Wed Nov 8 22:28:48 CET 2006
The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=779>
======================================================================
Reported By: IT
Assigned To: malekith
======================================================================
Project: Nemerle
Issue ID: 779
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
Resolution: not fixable
Fixed in Version:
======================================================================
Date Submitted: 10-30-2006 02:58 CET
Last Modified: 11-08-2006 22:28 CET
======================================================================
Summary: String concatination
Description:
Code:
module Test
{
Main () : void
{
_ = "" + match (1) { | 1 => "" | _ => "" } + ""
}
}
Error: cannot find the operator `op_UnaryPlus' on string
The following works fine:
module Test
{
Main () : void
{
_ = "" + (match (1) { | 1 => "" | _ => "" }) + ""
}
}
======================================================================
----------------------------------------------------------------------
malekith - 11-08-06 21:17
----------------------------------------------------------------------
This is a parsing problem. The code above is parsed as:
_ = "" + match (1) { | 1 => "" | _ => "" };
+ ""
I'm not quite sure this can be easily changed. As of now the parser always
thinks there is a ';' after '}'
----------------------------------------------------------------------
nazgul - 11-08-06 21:23
----------------------------------------------------------------------
Yeah, so I guess we sould close it as "by design" - this feature was done
to make following code patten possible:
def f() {
while (x) {
...
}
-count;
}
----------------------------------------------------------------------
malekith - 11-08-06 22:28
----------------------------------------------------------------------
This is ugly, but by design
Issue History
Date Modified Username Field Change
======================================================================
10-30-06 02:58 IT New Issue
11-08-06 21:17 malekith Note Added: 0001490
11-08-06 21:23 nazgul Note Added: 0001492
11-08-06 22:28 malekith Status new => resolved
11-08-06 22:28 malekith Resolution open => not fixable
11-08-06 22:28 malekith Assigned To => malekith
11-08-06 22:28 malekith Note Added: 0001495
======================================================================
More information about the bugs
mailing list