mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
16 lines
299 B
Zig
16 lines
299 B
Zig
pub fn f() void {
|
|
var bar: bool = true;
|
|
const S = struct {
|
|
fn baz() bool {
|
|
return bar;
|
|
}
|
|
};
|
|
_ = S;
|
|
}
|
|
|
|
// error
|
|
//
|
|
// :5:20: error: mutable 'bar' not accessible from here
|
|
// :2:9: note: declared mutable here
|
|
// :3:15: note: crosses namespace boundary here
|