Stewart Gordon <> changed:

           What    |Removed                     |Added
           Keywords|                            |accepts-invalid, spec
                 CC|                            |
            Version|2.035                       |1.051
             Blocks|                            |340
         OS/Version|Linux                       |All

--- Comment #3 from Stewart Gordon <> 2010-01-03 08:53:39 PST ---
I've never heard of default arguments being part of the function type's
properties.  I'd probably guessed that the type is simply void function(int)
but default arguments are filled in on the caller side.  In which case the
functions are the same type, and so this isn't meant to work.  Either way, it's
certainly a bug that the code is accepted.

And it applies to D1 too, but the code needs changing a bit:
import std.stdio;

void foo(Fn)(Fn fn) {

void bar(int i = 22) {
    writefln("bar ", i);
void bam(int i) {
    writefln("bam ", i);

void main() {

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to