First, I can guess that why Walter disagree *fixing* this problem.

http://dlang.org/overview.html
> Major Design Goals of D
> 9. Where D code looks the same as C code, have it either behave the same or issue an error.

Based on the design goal, we should not change the behavior toward foo(1) matching to long version.
It will change the code behavior that looks like C.

But, we can raise an "ambiguous error" for the case.
I think we need to add a "special rule" for more natural overload resolution in D.

// 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
}

Kenji Hara

2013/4/27 Walter Bright <newshound2@digitalmars.com>
On 4/26/2013 1:59 PM, Andrej Mitrovic wrote:
On 4/26/13, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
An even better example:

import std.stdio;

void foo(bool x) { writeln("1"); }
void foo(long x) { writeln("2"); }

void main()
{
     foo(1);  // "1"
     foo(false ? 2 : 1);  // "2"
}

Kill it with fire.

How about this one:

import std.stdio;

void foo(short x) { writeln("1"); }

void foo(long x) { writeln("2"); }

void main()
{
     foo(30000);  // "1"
     foo(false ? 40000 : 30000);  // "2"
}