Mercurial > projects > dstress
annotate run/t/typeof_09_A.d @ 1319:81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:58:06 +0000 |
parents | d3f836c7c9e6 |
children |
rev | line source |
---|---|
918 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <oskar.linde@gmail.com> | |
6 // @date@ 2006-03-16 | |
1319
81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
918
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=54 |
918 | 8 |
9 module dstress.run.t.typeof_09_A; | |
10 | |
11 typedef int MyInt = 4; | |
12 | |
13 template declare(X){ | |
14 X declare; | |
15 } | |
16 | |
17 typeof(declare!(MyInt[1]).ptr[0]) y; | |
18 | |
19 int main(){ | |
20 static if(!is(typeof(y) == MyInt)){ | |
21 static assert(0); | |
22 } | |
23 | |
24 if(y != cast(MyInt)4){ | |
25 assert(0); | |
26 } | |
27 | |
28 return 0; | |
29 } |