1 /* 2 TEST_OUTPUT: 3 --- 4 fail_compilation/fail284.d(19): Error: pure function 'fail284.foo' cannot call impure function pointer 'a' 5 --- 6 */ 7 8 static int nasty; 9 impure_evil_function(int x)10int impure_evil_function(int x) 11 { 12 nasty++; 13 return nasty; 14 } 15 foo(int x)16pure int foo(int x) 17 { 18 int function(int) a = &impure_evil_function; 19 return a(x); 20 } 21