[Issue 10609] New: Refused UFCS in __traits(compile)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 11 05:13:27 PDT 2013


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

           Summary: Refused UFCS in __traits(compile)
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-07-11 05:13:26 PDT ---
int foo(int x) { return x; }
void main() {
    immutable x = 1;
    static if (__traits(compiles, foo(x)))
        pragma(msg, "OK1");
    static if (__traits(compiles, 1.foo))
        pragma(msg, "OK2");
    static if (__traits(compiles, x.foo))
        pragma(msg, "OK3");
}


Prints:
OK1
OK2


Expected:
OK1
OK2
OK3

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