Implicit type conversions with data loss

ctrl vlad.z.4096 at gmail.com
Tue Jun 5 11:06:11 PDT 2012


I don't want them to be performed at all. How do I disable this 
'feature'?

For example, take a look at this code:

import std.stdio;
void main() {
	int x = -1;
	uint b = x;
	writeln(b);
}

It outputs 4294967295, but I want a compile-time error instead. 
Any suggestions?
(compiler version dmd 2.059)


More information about the Digitalmars-d mailing list