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

           Summary: toLower on alias this
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: luka8...@owave.net


--- Comment #0 from luka8088 <luka8...@owave.net> 2012-09-23 02:58:17 PDT ---
// it used to work in DMD2 0.57

module program;

import std.stdio;
import std.string;

struct myStruct {
  alias value this;
  string value;
}

void main () {

  myStruct s1;
  s1.value = "Test";

  writeln(s1); // outputs "Test"
  writeln(s1.toLower()); // phobos/std/string.d(871): Error: e2ir: cannot cast
result of type char[] to type myStruct

}

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

Reply via email to