www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13293] New: `typeof(<function returning T>)` gets printed as


          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.net

From 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