A private function, var or const no longer collides with the same spelling in another module, in no module or in the runtime: where two meet, each private one is renamed for its module (seed$shop), with every reference its module writes that no local shadows. Exported names stay one namespace. Nothing is renamed without a clash. Reseed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 lines
233 B
Text
10 lines
233 B
Text
# shop/index.ludic - private names a neighbour also uses: seed, dice, LIMIT
|
|
module shop
|
|
var dice: int = 100
|
|
const LIMIT: int = 5
|
|
function seed() -> int {
|
|
return dice + LIMIT
|
|
}
|
|
export function shop_seed() -> int {
|
|
return seed()
|
|
}
|