Attribute inference for auto functions?

Walter Bright newshound2 at digitalmars.com
Fri Apr 19 17:03:34 PDT 2013


On 4/19/2013 12:34 PM, deadalnix wrote:
> On Friday, 19 April 2013 at 19:06:39 UTC, Walter Bright wrote:
>> On 4/19/2013 6:55 AM, deadalnix wrote:
>>> As of for 2 I'd rather have a standard way to have attribute binding to the
>>> return type or the declaration. This is a recurring problem, and auto is simply
>>> one instance of it.
>>
>> I'm not understanding it being a recurring problem. There is a recurring
>> misunderstanding that attributes are applying to a type when they are defined
>> as applying to the declaration.
>>
>
> What is type of an impure function that return a pure, extern(C) function n D ?

A function foo:

extern(C) int function()pure foo() { return null; }

A type fp:

alias extern(C) int function()pure function() fp;


More information about the Digitalmars-d mailing list