[Issue 8780] New: std.traits.ReturnType of overloaded functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 8 03:47:05 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8780

           Summary: std.traits.ReturnType of overloaded functions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: luka8088 at owave.net


--- Comment #0 from luka8088 <luka8088 at owave.net> 2012-10-08 03:29:06 PDT ---
module program;

import std.stdio;
import std.traits;

int f1 () { return 1; }
string f1 () { return "2"; }

void main () {

  ReturnType!(f1) v1;

  writeln(typeid(typeof(v1))); // int
                               // chould this lead to unexpected behavior ?

}

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


More information about the Digitalmars-d-bugs mailing list