On Saturday, 14 November 2015 at 05:44:44 UTC, Anonymous wrote:
I was playing with some code someone posted on the forum that
involved opDispatch and compile time parameters. I pasted it in
a file named templOpDispatch.d, ran it, and got an error. Then
I noticed if I renamed the file it worked.
The source didn't matter; same thing happens with an empty main.
Ex: templOpDispatch.d contains just
void main() {}
Then running 'rdmd templOpDispatch.d' produces:
std.process.ProcessException@std\process.d(568): Failed to
spawn new process (The requested operation requires elevation.)
----------------
0x004396F0
0x0042AC3A
0x00403F66
0x00403FDF
0x00433043
0x00432F57
0x00426B70
0x7577337A in BaseThreadInitThunk
0x77969882 in RtlInitializeExceptionChain
0x77969855 in RtlInitializeExceptionChain
Windows 7
rdmd build 20150923
DMD32 D Compiler v2.068.2
But I can rename the file to rdmd templOpDispatc.d (remove h)
and all is good. Strange. Can anyone else reproduce this?
What about other file names that contain compiler recognised
names / keywords?