[Issue 5671] CTFE string concat problem

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 1 05:11:30 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5671


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2011-03-01 05:08:35 PST ---
Reduced test case shows it is a constant folding problem.
['a', 'b'] ~ "c" doesn't get constant folded.

string foo5671() {
    return ['a', 'b'];
}

string bug5671() {
    return foo5671() ~ "c";
}

static assert(bug5671() == "abc");

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list