digitalmars.D.bugs - [Issue 13293] New: `typeof(<function returning T>)` gets printed as
- via Digitalmars-d-bugs (29/30) Aug 14 2014 https://issues.dlang.org/show_bug.cgi?id=13293
https://issues.dlang.org/show_bug.cgi?id=13293 Issue ID: 13293 Summary: `typeof(<function returning T>)` gets printed as `T()` Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: schuetzm gmx.netFrom http://forum.dlang.org/post/vtkrrkxgkzcfktyymitm forum.dlang.org: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. --
Aug 14 2014