[Issue 11316] Some cases of missing delegate argument type inference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 21 12:06:23 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11316


Maxim Fomin <maxim at maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim at maxim-fomin.ru


--- Comment #1 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-10-21 12:06:20 PDT ---
I think parameter attribute should be provided for explicitly stating that
parameter 'x' will be passed in a specific way, so the fact that 

    void delegate(ref int x) F2;
    F2 = (ref int x) {};   // OK
    F2 = (x) {};           // Error
    void delegate(out int x) F3;
    F3 = (out int x) {};   // OK
    F3 = (x) {};           // Error

is rejected may be a good thing (my guess why first examples are compiled is
because qualifiers and attributes are trated separately, and 'in' is alias for
'const'). On the other hand, probably having attribute only in variable
declaration is enough and such bahavior may have value for generic programming.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list