digitalmars.D.learn - Bug in Rdmd?
- Jonathan Marler (10/10) Jun 13 2016 This code doesn't seem to work with rdmd. Is this a bug?
- Jeremy DeHaan (5/15) Jun 13 2016 Try removing the 'byLine' from the import statement. The error
- Jonathan Marler (3/20) Jun 13 2016 It actually is a free function (not a method on the File object).
- Adam D. Ruppe (5/6) Jun 13 2016 no, it isn't, it is on File.
- Jonathan Marler (6/12) Jun 13 2016 Shoot stupid mistake. You were right Jeremy and Adam. Thanks
This code doesn't seem to work with rdmd. Is this a bug?
import std.stdio : byLine;
int main(string[] args)
{
foreach(line; stdin.byLine) {
}
return 0;
}
Compiler Output:
Error: module std.stdio import 'byLine' not found
Jun 13 2016
On Tuesday, 14 June 2016 at 01:05:46 UTC, Jonathan Marler wrote:
This code doesn't seem to work with rdmd. Is this a bug?
import std.stdio : byLine;
int main(string[] args)
{
foreach(line; stdin.byLine) {
}
return 0;
}
Compiler Output:
Error: module std.stdio import 'byLine' not found
Try removing the 'byLine' from the import statement. The error
message looks like it can't find the function 'byLine' in the
std.stdio module. It isn't a free function, but one of File's
methods.
Jun 13 2016
On Tuesday, 14 June 2016 at 01:35:32 UTC, Jeremy DeHaan wrote:On Tuesday, 14 June 2016 at 01:05:46 UTC, Jonathan Marler wrote:It actually is a free function (not a method on the File object). This works if you compile it with dmd, just not with rdmd.This code doesn't seem to work with rdmd. Is this a bug? import std.stdio : byLine; int main(string[] args) { foreach(line; stdin.byLine) { } return 0; } Compiler Output: Error: module std.stdio import 'byLine' not foundTry removing the 'byLine' from the import statement. The error message looks like it can't find the function 'byLine' in the std.stdio module. It isn't a free function, but one of File's methods.
Jun 13 2016
On Tuesday, 14 June 2016 at 03:15:04 UTC, Jonathan Marler wrote:It actually is a free functionno, it isn't, it is on File. Your code doesn't compile on my dmd (and indeed it shouldn't on yours either unless you have a version mismatch. rdmd just calls dmd, it doesn't produce its own errors)
Jun 13 2016
On Tuesday, 14 June 2016 at 03:40:01 UTC, Adam D. Ruppe wrote:On Tuesday, 14 June 2016 at 03:15:04 UTC, Jonathan Marler wrote:Shoot stupid mistake. You were right Jeremy and Adam. Thanks for replying and showing me my silly error. I could have sworn byLine was a template and calling it with file was just UFCS...and I don't know how I was able to compile that with DMD...must have made a mistake somewhere. Thanks again.It actually is a free functionno, it isn't, it is on File. Your code doesn't compile on my dmd (and indeed it shouldn't on yours either unless you have a version mismatch. rdmd just calls dmd, it doesn't produce its own errors)
Jun 13 2016








Jonathan Marler <johnnymarler gmail.com>