https://issues.dlang.org/show_bug.cgi?id=14735
--- Comment #7 from Kenji Hara <[email protected]> --- Sorry, this is a compiler bug, because of the incomplete implementation for the language enhancement from 2.063. Code to illustrate issue. int foo(Range )(Range s, in dchar c) { return 1; } // A int foo(T, size_t n)(ref T[n] s, in dchar c) { return 2; } // B void main() { char[64] buf; // Supported from 2.063: (http://dlang.org/changelog#implicitarraycast) assert(foo(buf[0..32], '\0') == 2); // Not yet supported case (it's a compiler bug) assert(foo(buf[], '\0') == 2); } In both cases (buf[0..23] and buf[]), the foo calls should match to B, because it's specialized version to the static array argument than A. --
