Odd Error Message

CraigDillabaugh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Dec 15 14:09:28 PST 2014


Given the following program:

import std.string;
import std.stdio;

void main()
{	
	File file = File("blah.txt", "r");
	
	while( !(file.eof()) && count > 10 ) {  //line 8
		//
	}
}

I get the error message:

line(8): Error: void has no value

If I comment out the import std.string; then I get an error I 
would expect.

line(8): Error: undefined identifier count

There is no 'count' symbol that I can see in std.string.

Would this error message be considered a compiler bug?

DMD32 D Compiler v2.066.1 (on Windows 7)



More information about the Digitalmars-d-learn mailing list