digitalmars.D.bugs - [Issue 4353] New: std.utf.stride doesn't work in ctfe
- d-bugmail puremagic.com (34/34) Jun 20 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4353
- d-bugmail puremagic.com (22/22) Dec 08 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4353
- d-bugmail puremagic.com (11/11) Jun 17 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4353
http://d.puremagic.com/issues/show_bug.cgi?id=4353 Summary: std.utf.stride doesn't work in ctfe Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: ellery-newcomer utulsa.edu 13:45:53 PDT --- due to some petty stupid thing, unless you're willing to cast. This: import std.utf; void main(){ enum string s = "hi!"; enum int i = stride(s,0); } gives this: test.d(6): Error: function std.utf.stride called with argument types: ((string,int)) matches both: std.utf.stride(in const(char[]) s, uint i) and: std.utf.stride(in const(dchar[]) s, uint i) comment out the enums and it does no such thing. Actually, pretending a char[] is a dchar[] might not be petty.. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 20 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4353 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid CC| |clugdbug yahoo.com.au Actually this isn't a CTFE bug. The issue is implicit conversion of string literals. ------- void stride(const(char[]) s) {} void stride(const(dchar[]) s) {} void main(){ string w = "hi"; stride(w); // ok stride("hi"[]); // ok stride("hi"); // fails } ------ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 08 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4353 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE *** This issue has been marked as a duplicate of issue 2367 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 17 2011