package-private visibility

This commit is contained in:
2026-08-01 22:55:35 +02:00
parent 304880a9aa
commit f267e8c3cb
11 changed files with 301 additions and 185 deletions
+3 -2
View File
@@ -207,8 +207,9 @@ value :: math.sum(other_math.value, 1)
```
Top-level declarations are public by default. Prefix a declaration with `hide`
to keep it local to its source file; leading underscores have no visibility
meaning. Imports are always file-local and cannot be hidden or re-exported:
to keep it local to its package; sibling files can use it, but importing packages
cannot. Leading underscores have no visibility meaning. Imports are always file-local
and cannot be hidden or re-exported:
```bro
hide helper func() i32 { return 42 }