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