www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2885] New: Silent forward reference bug using ReturnType

reply d-bugmail puremagic.com writes:

           Summary: Silent forward reference bug using ReturnType
           Product: D
           Version: 1.041
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: cbkbbejeap mailinator.com
OtherBugsDependingO 340

import std.traits;

// Outputs: "false"
pragma(msg, is(ReturnType!(foo):int)? "true":"false");

int foo()
{ return 1; }

// Outputs: "true"
pragma(msg, is(ReturnType!(foo):int)? "true":"false");

Apr 23 2009
parent d-bugmail puremagic.com writes:

kennytm gmail.com changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |kennytm gmail.com
         Resolution|                            |DUPLICATE

--- Comment #1 from kennytm gmail.com 2011-04-24 00:14:44 PDT ---
Same issue as 5601.

(Also, the error is *not* silent. It is silent only because of the is()
expression. Not a 'wrong-code', just 'reject-valid'.)

*** This issue has been marked as a duplicate of issue 5601 ***

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 24 2011