[Issue 5724] New: web example of BufferedFile has compile error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 9 02:24:51 PST 2011


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

           Summary: web example of BufferedFile has compile error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: websites
        AssignedTo: nobody at puremagic.com
        ReportedBy: rinick at gmail.com


--- Comment #0 from ZY Zhou <rinick at gmail.com> 2011-03-09 02:21:29 PST ---
http://www.digitalmars.com/d/2.0/phobos/std_stream.html

  Stream file = new BufferedFile("sample.txt");
  foreach(ulong n, string line; file) {
     stdout.writefln("line %d: %s",n,line);
  }

Error: function std.stream.Stream.opApply (scope int delegate(ref cha
r[]) dg) is not callable using argument types (int delegate(ref ulong
__applyArg
0, ref string __applyArg1))
Error: cannot implicitly convert expression (__foreachbody1239) of ty
pe int delegate(ref ulong __applyArg0, ref string __applyArg1) to int
delegate(r
ef ulong n, ref wchar[] line)

-- 
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