Mercurial > projects > dstress
annotate run/t/typeof_09_E.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_E; | |
10 | |
11 typedef int MyInt = 4; | |
12 | |
13 typeof((new MyInt[1]).ptr[0]) y; | |
14 | |
15 int main(){ | |
16 static if(!is(typeof(y) == MyInt)){ | |
17 static assert(0); | |
18 } | |
19 | |
20 if(y != cast(MyInt)4){ | |
21 assert(0); | |
22 } | |
23 | |
24 return 0; | |
25 } |