On 4/27/13, kenji hara <k.hara...@gmail.com> wrote: > // The expected behavior we can do at the most > extern(C) int printf(const char*, ...); > void foo(bool) { printf("bool\n"); } > void foo(long) { printf("long\n"); } > void main() > { > foo(0); // Error: function foo called with argument types: (int) matches > both foo(bool) and foo(long) > foo(1); // Error: function foo called with argument types: (int) matches > both foo(bool) and foo(long) > foo(2); // OK, matches to long > }
That's even more stupid. We need *less* special cases, not more. We already have true/false, they're keywords, any other integral literal (*literal*, not expression) should not implicitly convert to bool.