dmd 1.056 and 2.040 release

Robert Jacques sandford at jhu.edu
Sat Jan 30 10:10:22 PST 2010


On Sat, 30 Jan 2010 10:56:28 -0500, Ary Borenszweig <ary at esperanto.org.ar>  
wrote:

> Walter Bright wrote:
>>  http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.056.zip
>>   http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.040.zip
>>  Thanks to the many people who contributed to this update!
>
> Very nice! Each release kills a lot of bugs and adds small but very  
> powerful features.
>
> About the interface functions, this compiles:
>
> --
> import std.stdio;
>
> interface One {
>
>    final void foo() {
>      writefln("One");
>    }
>
> }
>
> interface Two {
>
>    final void foo() {
>      writefln("Two");
>    }
>
> }
>
> class X : One, Two {
> }
>
> class Y : Two, One {
> }
>
> void main() {
>    X x = new X();
>    x.foo(); // prints "One"
>    Y y = new Y();
>    y.foo(); // prints "Two"
> }
> --
>
> Is this intended behaviour? Might leads to obscure bugs...

This looks like a form of function hijacking, so it should be a  
accepts-invalid bug.


More information about the Digitalmars-d-announce mailing list