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

           Summary: [CTFE] Strange behavior of using ~= operator twice
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: youx...@gmail.com


--- Comment #0 from Hisayuki Mima <youx...@gmail.com> 2011-07-09 01:17:00 PDT 
---
struct Foo{
    int[] i;
}

bool func(){
    Foo foo;
    foo.i ~= 1;
    foo.i ~= 2;//Compile fails on this line.
    return true;
}

When I compiled this source code, compile of dmd v2.054 built from trunk
failed.

Error: foo.i ~= 2 cannot be evaluated at compile time

This may shows that operator ~= or array in CTFE has wrong behavior.

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

Reply via email to