| 1 | fn outer(y: u32) *const fn (u32) u32 { |
| 2 | const st = struct { |
| 3 | fn get(z: u32) u32 { |
| 4 | return z + y; |
| 5 | } |
| 6 | }; |
| 7 | return st.get; |
| 8 | } |
| 9 | export fn entry() void { |
| 10 | const func = outer(10); |
| 11 | const x = func(3); |
| 12 | _ = x; |
| 13 | } |
| 14 | |
| 15 | // error |
| 16 | // |
| 17 | // :4:24: error: 'y' not accessible from inner function |
| 18 | // :3:9: note: crossed function definition here |