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
+2 -32
View File
@@ -1,36 +1,5 @@
import "../dep"
hide Thing :: struct {
value i32
}
hide Local_Union :: union {
value i32
}
hide Local_Enum :: enum {
value
}
hide Local_Opaque :: opaque
hide Local_Distinct :: distinct i32
hide Local_Alias :: alias i32
hide value :: 2
hide mutable_value i32 = 2
hide helper func() i32 {
thing Thing = Thing { value = value }
return thing.value
}
hide local_foreign c_func() i32 {
return 1
}
hide Local_C_Record :: c_struct {
value c_int
}
Box :: struct {
_value i32
@@ -39,5 +8,6 @@ Box :: struct {
from_b func(_input i32) i32 {
_local Box = Box { _value = _input }
record _C_Record = _C_Record { value = 0 }
return helper() + _local._value + _foreign() + i32(record.value) + dep._visible()
thing Thing = Thing { value = value }
return helper() + thing.value + _local._value + _foreign() + i32(record.value) + dep._visible()
}