LDC2 1.9.0 beta 1 bug
Shachar Shemesh
shachar at weka.io
Thu Oct 4 12:51:27 UTC 2018
I got this as a report from a user, not directly running this, which is
why I'm not opening a bug report.
Consider the following function:
void f(ARGS...)(ARGS args, bool arg1 = true, char arg2 = 'H');
Now consider the following call to it:
f(true, 'S');
Theoretically, this can either be calling f!()(true, 'S') or f!(bool,
char)(true, 'S', true, 'H');
Under 1.8.0, it would do the former. Under 1.9.0-beta1, the later.
Why is this a bug?
Two reasons. First, this is a change of behavior.
More to the point, however, expanding the call to the second form means
that I can *never* supply non-default values to arg1 and arg2.
root at 5f3623338be8:/src# ldc2 --version
LDC - the LLVM D compiler (1.9.0-beta1):
based on DMD v2.079.1 and LLVM 6.0.0
built with LDC - the LLVM D compiler (1.9.0-beta1)
Default target: x86_64-unknown-linux-gnu
Host CPU: broadwell
http://dlang.org - http://wiki.dlang.org/LDC
Shachar
More information about the Digitalmars-d
mailing list