Mercurial > projects > ldc
view tests/mini/bug163_void_condexp.d @ 947:9a10fa839dc5
Switch some getModule to getCompilationModule to make sure templates are
emitted in the right module.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 08 Feb 2009 18:51:32 +0100 |
parents | 7f6eeb7b003e |
children |
line wrap: on
line source
static foocalled = false; static barcalled = false; void foo() { foocalled = true; } void bar() { barcalled = true; } void f(bool b) { return b ? foo() : bar(); } void main() { f(true); assert(foocalled && !barcalled); f(false); assert(foocalled && barcalled); }