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

           Summary: [CTFE] Cannot evaluate SliceExp on if condition
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2011-07-15 23:13:22 PDT ---
This code should be compiled, but it generate error.

----
bool func(string s)
{
    if (s[0..1])
        return true;
    return false;
}
enum f = func("str");

void main(){}
----
test.d(7): Error: cannot evaluate func("str") at compile time
----

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

Reply via email to