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

           Summary: Templates instantiated only through is(typeof())
                    shouldn't cause errors
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: clugd...@yahoo.com.au


--- Comment #0 from Don <clugd...@yahoo.com.au> 2011-09-13 02:44:40 PDT ---
The template blaz!int cannot be instantiated without errors, because it
contains an assignment of a string literal to int. But, since it is not
actually instantiated, it shouldn't cause a compile error.

template blaz(Q)
{
    int qutz(Q y)
    {
        Q q = "abc";
        return 67;
    }
    static assert(qutz(13).sizeof!=299);
    const Q blaz = 6;
}

static assert(is(typeof(blaz!(int).blaz)));

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

Reply via email to