On Wednesday, 9 August 2017 at 01:39:07 UTC, Jason Brady wrote:
Why does the following code error out with:
app.d(12,10): Error: function app.FunctionWithArguments (uint
i) is not callable using argument types ()
Like Olivier said, stringof expects a valid expression. There are
a few other options:
module foo;
import std.traits;
pragma(msg, bar(3).stringof); // prints "bar(3)"
pragma(msg, (&bar).stringof); // "& bar"
pragma(msg, fullyQualifiedName!bar); // "foo.bar"
pragma(msg, __traits(identifier, bar)); // "bar"
void bar(int n) {}