[Issue 8709] New: toLower on alias this

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 23 02:57:20 PDT 2012


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: nobody at puremagic.com
        ReportedBy: luka8088 at owave.net


--- Comment #0 from luka8088 <luka8088 at 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: -------


More information about the Digitalmars-d-bugs mailing list