On Wednesday, 27 June 2018 at 14:23:25 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote:
On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote:
On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote:
[...]

aliasing a function type only works with the old syntax too:

    alias void proto_identifier();

Very unfriendly syntax. Impossible to express with AliasDeclarationY (aka "the new alias syntax").

You can use this syntax for functions :

`alias proto_identifier = void function();`

Nah it's not the same thing ;)

----
void main()
{
    alias void proto_identifier_old();
    alias proto_identifier_new = void function();
assert(!is(proto_identifier_old == proto_identifier_new)); // passes
}
----

- proto_identifier_new is a function type (stuff)
- proto_identifier_new is a function **pointer** type (e.g &stuff)

Actually my answer was more informative because i reported this limitation years ago, see https://issues.dlang.org/show_bug.cgi?id=16020.


Reply via email to