mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 15:12:31 +00:00
17 lines
313 B
Zig
17 lines
313 B
Zig
pub fn f() void {
|
|
var bar: bool = true;
|
|
_ = &bar;
|
|
const S = struct {
|
|
fn baz() bool {
|
|
return bar;
|
|
}
|
|
};
|
|
_ = S;
|
|
}
|
|
|
|
// error
|
|
//
|
|
// :6:20: error: mutable 'bar' not accessible from here
|
|
// :2:9: note: declared mutable here
|
|
// :4:15: note: crosses namespace boundary here
|