view tests/mini/bug44.d @ 1286:23b23b74e326

Remove calls to some runtime functions if their results are unused
author Frits van Bommel <fvbommel wxs.nl>
date Sat, 02 May 2009 11:58:50 +0200
parents 44f08170f4ef
children
line wrap: on
line source

module bug44;

struct rgb
{
    long l;
}

void foo()
{
}

rgb test() {
  scope(exit) foo();
  return rgb();
}

void main()
{
    rgb r = test();
}