1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag9831.d(12): Error: function diag9831.main.__lambda1 cannot access frame of function D main
5 ---
6 */
7 
main()8 void main()
9 {
10     immutable int c;
11     int function(int x) func;
12     func = x => c;
13 }
14