www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9504] New: typeof does not look up properties correctly on template argument

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9504

           Summary: typeof does not look up properties correctly on
                    template argument
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com



struct Bar
{
    template Abc(T)
    {
        T y;
    }

    enum size_t num = 123;

    class Def {}
}

template GetSym(alias sym) { }
template GetExp(size_t n) { }
template GetTyp(T) { }
alias GetSym!(typeof(Bar.init).Abc) X; // NG
alias GetExp!(typeof(Bar.init).num) Y; // NG
alias GetTyp!(typeof(Bar.init).Def) Z;

Bar func()
{
    alias GetSym!(typeof(return).Abc) V; // NG
    alias GetExp!(typeof(return).num) W; // NG
    alias GetTyp!(typeof(return).Def) X;
    return Bar();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 13 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9504


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/1659

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 13 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9504




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e877fb2e47c197427cfa1c50039a563a31e2d7f5
fix Issue 9504 - typeof does not look up properties correctly on template
argument

The identifiers followed by typeof(exp) or typeod(return) may be resolved to
symbol or expression. Type[Typeof|Return]::resolve should consider it.

https://github.com/D-Programming-Language/dmd/commit/0c33e5e0547dd5313e0d7c12b1c15d2fc5deeb97


Issue 9504 - typeof does not look up properties correctly on template argument

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