Mercurial > projects > dstress
changeset 355:1fdd5e511aaf
operator precedence like C
Walter <walter@walterbright.com>
2005-03-22
mail:008a01c52ec3$f8d00550$0200a8c0@colossus
author | thomask |
---|---|
date | Tue, 22 Mar 2005 12:00:09 +0000 |
parents | 6aaba08b3ca2 |
children | a1f59b48d72c |
files | nocompile/bug_expression_661_A.d nocompile/bug_expression_661_B.d run/bug_expression_661_A.d run/bug_expression_661_B.d |
diffstat | 4 files changed, 34 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/bug_expression_661_A.d Tue Mar 22 12:00:09 2005 +0000 @@ -0,0 +1,19 @@ +// $HeadURI$ +// $Date$ +// $Author$ + +// @uri@ news:opsh76x6l7jccy7t@simon.homenet +// @author@ Simon Buchan <currently@no.where> +// @date@ 2004-11-30 +// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs:2371 + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.bug_expression_661_A; + +ulong[cast(uint)((cast(float)byte.sizeof/ulong.sizeof)-int.max>>2)+int.max>>2] hexarray; + +int main(){ + assert(!(hexarray === null)); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/bug_expression_661_B.d Tue Mar 22 12:00:09 2005 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-02-03 +// @uri@ news:ctth2h$1ai$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.bug_expression_661_B; + +void test(){ + int i = cast(int)(.0>>0); +}
--- a/run/bug_expression_661_A.d Tue Mar 22 11:46:11 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -// $HeadURI$ -// $Date$ -// $Author$ - -// @uri@ news:opsh76x6l7jccy7t@simon.homenet -// @author@ Simon Buchan <currently@no.where> -// @date@ 2004-11-30 -// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs:2371 - -module dstress.run.bug_expression_661_A; - -ulong[cast(uint)((cast(float)byte.sizeof/ulong.sizeof)-int.max>>2)+int.max>>2] hexarray; - -int main(){ - assert(!(hexarray === null)); - return 0; -}
--- a/run/bug_expression_661_B.d Tue Mar 22 11:46:11 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ zwang <nehzgnaw@gmail.com> -// @date@ 2005-02-03 -// @uri@ news:ctth2h$1ai$1@digitaldaemon.com - -module dstress.run.bug_expression_661_B; - -int main(){ - return cast(int)(.0>>0); -}