diff --git a/test/runnable/imports/test41a.d b/test/runnable/imports/test41a.d index 20750c913c04..acc1b8cecd92 100644 --- a/test/runnable/imports/test41a.d +++ b/test/runnable/imports/test41a.d @@ -5,8 +5,9 @@ void foo() assert(false, "GO"); } +int i; // make func impure so it is not ctfed away public void func(T)() { - assert(false, "Blah"); + assert(i, "Blah"); } diff --git a/test/runnable/test41.d b/test/runnable/test41.d index 89f4e81a4b33..cc6f93971a05 100644 --- a/test/runnable/test41.d +++ b/test/runnable/test41.d @@ -14,7 +14,7 @@ int main() catch (AssertError e) { } - + try { func!(void)();