blob: a33f2c597fb1ea75e2b3dccff63b4a08c354a6d7 [file] [log] [blame]
/*
TEST_OUTPUT:
---
fail_compilation/fail284.d(19): Error: pure function 'fail284.foo' cannot call impure function pointer 'a'
---
*/
static int nasty;
int impure_evil_function(int x)
{
nasty++;
return nasty;
}
pure int foo(int x)
{
int function(int) a = &impure_evil_function;
return a(x);
}