[Issue 6435] New: Regression (2.054) Cannot append to a string member of a struct in CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 3 11:19:12 PDT 2011


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

           Summary: Regression (2.054) Cannot append to a string member of
                    a struct in CTFE
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: samukha at voliacable.com


--- Comment #0 from Max Samukha <samukha at voliacable.com> 2011-08-03 11:19:10 PDT ---
struct S
{
    string bar;
}

int foo()
{
    S s;
    s.bar = "one"; // compiles if this is commented out
    s.bar ~= "two";
    return 0;
}

auto x = foo();

void main()
{       
}

Error: s.bar ~= "two" cannot be evaluated at compile time

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