[Issue 3827] automatic joining of adjacent strings is bad

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 10 18:18:28 PST 2010


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



--- Comment #9 from bearophile_hugs at eml.cc 2010-11-10 18:17:17 PST ---
Another bug caused in my code by that anti-feature:


unittest {
    auto tests = [["", "0000"], ["12346", "0000"], ["he", "H000"],
                  ["soundex", "S532"], ["example", "E251"],
                  ["ciondecks", "C532"], ["ekzampul", "E251"],
                  ["resume", "R250"], ["Robert", "R163"],
                  ["Rupert", "R163"], ["Rubin" "R150"],
                  ["Ashcraft", "A226"], ["Ashcroft", "A226"]];
    foreach (pair; tests)
        assert(processit(pair[0]) == pair[1]);
}


That code compiles with no errors with DMD 2.050, and then causes a Range
violation at runtime because one of those arrays isn't a pair.

-- 
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