[Issue 10886] New: Typeof in templates works incorrectly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 24 14:37:49 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10886
Summary: Typeof in templates works incorrectly
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: temtaime at gmail.com
--- Comment #0 from Temtaime <temtaime at gmail.com> 2013-08-24 14:37:48 PDT ---
struct A {
pure auto foo() @property { return 0; }
}
struct B {
void bar(T)() {
alias B = typeof(T.foo);
}
}
void main() {
B b;
b.bar!A();
}
Output:
Error: this for foo needs to be type A not type B
Error: template instance hello.B.bar!(A) error instantiating
--
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