[Issue 9504] New: typeof does not look up properties correctly on template argument
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 13 00:04:14 PST 2013
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 at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-02-13 00:04:13 PST ---
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: -------
More information about the Digitalmars-d-bugs
mailing list