hello,<div>I wrote this little test:</div><div><div>import std.stdio;</div><div><br></div><div>void main(){</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>auto testfile=new File("test.txt");</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>foreach(string line;lines(testfile))</div><div><span class="Apple-tab-span" style="white-space:pre">         </span>writeln(line);</div>
<div>}</div></div><div>and get as error </div><div><div>src\main.d(6): Error: constructor std.stdio.lines.this (File f, dchar terminator = cast(dchar)'\x0a') is not callable using argument types (File*)</div><div>
src\main.d(6): Error: cannot implicitly convert expression (testfile) of type File* to File</div></div><div><br></div><div>Why?</div><div>I've also noticed the argument to lines in the example was a stream but now it claims to be a File. when I feed it a File it complains it is given a *File... what am I doing wrong?</div>