[Issue 9525] New: [CTFE] Cannot convert &S to const(S*) at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 17 02:02:05 PST 2013


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

           Summary: [CTFE] Cannot convert &S to const(S*) at compile time
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: CTFE, rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-02-17 13:02:02 MSK ---
This code used to work in 2.061:
---
void f(T)(in T*) { }

void main()
{
    void test(alias a)()
    {
        static struct S { }
        S s;
        a(&s); // Error: Cannot convert &S to const(S*) at compile time
    }
    static assert((test!f(), true));
}
---

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