Am 15.02.2012, 23:07 Uhr, schrieb Ali Çehreli <[email protected]>:
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;".