May 03, 2017
On Wednesday, 3 May 2017 at 09:21:47 UTC, nkm1 wrote:
> On Wednesday, 3 May 2017 at 07:34:03 UTC, Daniel Kozák wrote:
>>
>> print in A is template:
>>
>
> What :)
> How does it interact with 'final'?

If it were a template (and it's not), then final would not be applicable, because templated functions cannot be virtual.

- Jonathan M Davis
May 03, 2017
On Wednesday, 3 May 2017 at 07:37:31 UTC, Jacob Carlborg wrote:
> It might be by accident but I think the compiler is inferring the return type. Just as "auto" is not necessary to infer the type of a variable if there's another attribute:

No accident there, the spec says any storage class will do:
http://dlang.org/spec/function.html#auto-functions

"An auto function is declared without a return type. If it does not already have a storage class, use the auto storage class. "
May 08, 2017
On 2017-05-03 14:50, Adam D. Ruppe wrote:

> No accident there, the spec says any storage class will do:
> http://dlang.org/spec/function.html#auto-functions
>
> "An auto function is declared without a return type. If it does not
> already have a storage class, use the auto storage class. "

I see.

-- 
/Jacob Carlborg
1 2
Next ›   Last »