February 14, 2006 -H bug with templates | ||||
---|---|---|---|---|
| ||||
Compile the following with dmd -H -c ---------------------- class Test { void a() {} void b() {} void c() {} void d() {} void e() {} void f() {} void g() {} void h() {} void i() {} void j() {} void k() {} void l() {} void m() {} void n() {} void o() {} void p() {} void q() {} void r() {} void s() {} void t() {} void u() {} void v() {} void w() {} void x() {} void y() {} void z() {} void aa() {} void bb() {} void cc() {} void dd() {} void ee() {} // Try adding or removing some functions here to see the effect. template A(T) { } alias A!(uint) getHUint; alias A!(int) getHInt; alias A!(float) getHFloat; alias A!(ulong) getHUlong; alias A!(long) getHLong; alias A!(double) getHDouble; alias A!(byte) getHByte; alias A!(ubyte) getHUbyte; alias A!(short) getHShort; alias A!(ushort) getHUShort; alias A!(real) getHReal; } ------------------------ The resulting .di file will contain alias A!(uint) getHUint; alias A!(int) getHInt; alias A!(float) getHFloat; alias A!(ulong) getHUlong; alias A!(...) getHLong; alias A!(double) getHDouble; alias A!(...) getHByte; alias A!(ubyte) getHUbyte; alias A!(...) getHShort; alias A!(ushort) getHUShort; alias A!(...) getHReal; some type names have mysteriously been exchanged with '...'. Where the '...'s begin depend on how many members (or other statements) preceed the template declarations. Nick |
Copyright © 1999-2021 by the D Language Foundation