Mercurial > projects > dstress
changeset 1097:ba136e21b011
[Issue 274] Different template alias arguments are treated as the same.
Bruno Medeiros <daiphoenix@lycos.com>
2006-08-01
news:bug-274-3@http.d.puremagic.com/issues/
author | thomask |
---|---|
date | Mon, 14 Aug 2006 11:37:36 +0000 |
parents | daa894e9fb12 |
children | 19734284b75a |
files | run/t/template_42_A.d |
diffstat | 1 files changed, 39 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_42_A.d Mon Aug 14 11:37:36 2006 +0000 @@ -0,0 +1,39 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Bruno Medeiros <daiphoenix@lycos.com> +// @date@ 2006-08-01 +// @uri@ news:bug-274-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 274] Different template alias arguments are treated as the same. + +module dstress.run.t.template_42_A; + +class Foo { +} + +class Bar { +} + +template aliastest(alias A) { + char[] aliastest() { + return (new A!().al).classinfo.name; + } +} + +template outerBox(alias A) { + template box() { + alias A al; + } +} + +int main() { + if(aliastest!(outerBox!(Foo).box) ()[$-3 .. $] != "Foo"){ + assert(0); + } + if(aliastest!(outerBox!(Bar).box) ()[$-3 .. $] != "Bar"){ + assert(0); + } + return 0; +} +