On 30.07.2016 04:49, deadalnix wrote:
On Friday, 29 July 2016 at 04:44:16 UTC, Timon Gehr wrote:
My parser accepts the following:

int function(int,int)ref functionPointer;

I wasn't really aware that this was illegal in DMD. (Other function
attributes, such as pure, are accepted.)

In fact, even the following is disallowed:
int foo(int)ref{}


Should I file an enhancement request?

That doesn't fix the above mentioned problem, as ref bind to the
variable rather than the type.


How does it not fix the problem? int function(int,int)ref is the type of a ref-return function.

postfix ref is not accepted because it can only apply to the type I
guess.

How does it apply to the type?

This is one more example of design being unprincipled to boot.

Well, it's more or less reasonable save for the parser inconsistencies.

Reply via email to