On 06/12/2014 01:36 PM, Andrew Edwards wrote:

> void foo() {}
> alias bar = foo();
>
> Am I just misunderstanding what is meant by types?

Seems to be an old behavior. That does not compile with 2.066:

Error: function declaration without return type. (Note that constructors are always named 'this')

The following compiles though:

alias bar = foo;

I stand corrected: alias works not only with types but with symbols as well. I was right about the original code though: "Aliases cannot be used for expressions".

Ali

Reply via email to