DMD different compiler behaviour on Linux and Windows
Zans
dlafotok at inbox.lv
Thu Apr 25 20:18:28 UTC 2019
import std.stdio;
void main()
{
char[] mychars;
mychars ~= 'a';
long index = 0L;
writeln(mychars[index]);
}
Why would the code above compile perfectly on Linux (Ubuntu
16.04), however it would produce the following error on Windows
10:
source\app.d(8,21): Error: cannot implicitly convert expression
index of type long to uint
On both operating systems DMD version is 2.085.0.
More information about the Digitalmars-d-learn
mailing list