Favorite bug?

Manfred Nowak svv1999 at hotmail.com
Wed Jul 11 12:51:51 PDT 2007


Brad Roberts wrote

> what would it be and why?

Fixing the two years old undetected ambiguity bug:

import std.stdio;
class Foo {
 this( int x, int y){ writefln( "two parm");};
 this( int x ){ writefln( "one parm");};
}
void test( Foo f ...){}
void test( int x, Foo f ...){}
void main(){
  test( 1, 1); // ambiguities:
               //  test( Foo(1,1))
               //  test( 1, Foo(1))
}

because this sort of ambiguities seems intractable.

-manfred



More information about the Digitalmars-d mailing list