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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Kenji Hara <[email protected]> 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: -------