Skip to content

Commit

Permalink
Fix bad usage of int *= float: generate a const shift by other means
Browse files Browse the repository at this point in the history
  • Loading branch information
legrosbuffle committed May 17, 2015
1 parent 46096c0 commit 4fb90c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/runnable/test42.d
Expand Up @@ -4582,11 +4582,11 @@ void test7212()

void test242()
{
foreach(v; long.max / 4 .. long.max / 4 + 1)
foreach(v; long.max / 8 .. long.max / 8 + 1)
{
immutable long t1 = v;
long t2 = t1 + t1;
t2 *= 1.0;
t2 *= 1L << 1;
assert(t2 > long.max / 4);
}
}
Expand Down

0 comments on commit 4fb90c7

Please sign in to comment.