dmd 1.073 and 2.058 release

Marco Leise Marco.Leise at gmx.de
Thu Feb 16 05:45:46 PST 2012


Am 15.02.2012, 23:07 Uhr, schrieb Ali Çehreli <acehreli at yahoo.com>:

> On 02/15/2012 07:49 AM, bearophile wrote:
>> Andrej Mitrovic:
>>
>>> That doesn't seem to work. So does anyone know what exactly is  
>>> implemented?
>>
>> I don't know. See:
>> https://github.com/D-Programming-Language/dmd/pull/582
>>
>> Bye,
>> bearophile
>
> Is UFCS DOA? Here is my experiment:
>
> struct S
> {}
>
> @property int foo(S)
> {
>      return 42;
> }
>
> void main()
> {
>      auto s = S();
>      s.foo();       // Error: no property 'foo' for type 'S'
> }
>
> Ali

I'm just repeating what's already been said, but UFCS on classes and  
structs has the problem of ambiguities with proper methods of those. If  
2.058 introduced more UFCS, then it is for literals. Try "123.foo;".


More information about the Digitalmars-d-announce mailing list