DMD 1.026 and 2.010 releases
Matti Niemenmaa
see_signature at for.real.address
Mon Jan 21 00:52:59 PST 2008
Extrawurst wrote:
> Walter Bright schrieb:
>> Extrawurst wrote:
>>> but what happened to scoped interfaces:
>>> [CODE]
>>>
>>> interface IFoo {
>>> }
>>>
>>> class Foo : IFoo {}
>>>
>>> IFoo getaFoo(){
>>> return new Foo();
>>> }
>>>
>>> void main() {
>>> scope auto a = getaFoo();
>>> }
>>>
>>> [/CODE]
>>>
>>> this is illegal since 2.010. how can i do such a thing from now on ?
>>
>> It never worked anyway. The problem is an interface cannot be deleted.
>> The solution is two steps:
>>
>> scope f = new Foo();
>> IFoo i = f;
>
> The point is that an unchanged code that used to work with dmd2.009 did
> exactly that and worked. By changing to dmd2.010 it is now broken.
It didn't always work: http://d.puremagic.com/issues/show_bug.cgi?id=1719
--
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
More information about the Digitalmars-d-announce
mailing list