1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag9620.d(18): Error: pure function 'diag9620.main.bar' cannot call impure function 'diag9620.foo1'
5 fail_compilation/diag9620.d(19): Error: pure function 'diag9620.main.bar' cannot call impure function 'diag9620.foo2!().foo2'
6 ---
7 */
8 
9 int x;
10 
foo1()11 void foo1() { x = 3; }
foo2()12 void foo2()() { x = 3; }
13 
main()14 void main() pure
15 {
16     void bar()
17     {
18         foo1();
19         foo2();
20     }
21 }
22