From http://forum.dlang.org/post/[email protected]:
struct Result {
public @property auto save1() {
return this;
}
public auto save2() {
return this;
}
}
pragma(msg, typeof(Result.init.save1));
pragma(msg, typeof(Result.init.save2));
This outputs:
Result
Result()
I guess the second type is supposed to represent the function? It should print something that makes this clear, `Result()` doesn't make sense.
Comment #1 by schuetzm — 2015-06-06T11:37:15Z
With latest DMD from Git, this now prints "pure nothrow @nogc @safe Result()", which is still wrong.
Comment #2 by stanislav.blinov — 2021-12-08T17:33:37Z
What would be the expected output?
Comment #3 by hsteoh — 2021-12-08T17:58:22Z
I'd expect something like `Result function()` or something along those lines, rather than `Result()` which looks like a ctor invocation.
Comment #4 by robert.schadek — 2024-12-13T18:23:56Z