Hi!

I think this code should not be compiled without any warning:

import std.stdio;

void f(int a) {
    writeln("it's a function! : ", a);
}

void main() {
auto f = function (int a) {writeln("It's a variable! : ", a);};
    5.f();
    f(5);
}

Output:

it's a function! : 5
It's a variable! : 5

WBR,
    Fyodor.

Reply via email to