Lyricdev
GitHub

LYR-MIG0106

declarations the whole package now sees

hint · spec 14-cli

A note of lyric fix --from-4, once a module: declarations without pub were private to their module in Lyric 4 and are seen by the whole package in Lyric 5. main is left aside.

Explanation

In Lyric 4 a declaration without pub was the module's alone. In Lyric 5 it is internal: every module of the package sees it, and only pub reaches other packages. The program still compiles; what changes is who may use the declaration.

Write private before a declaration only its module may see.

Example

proposal[LYR-MIG0106] src/util.lyr:5:1: 1 declaration without 'pub' were private to the module in Lyric 4; in Lyric 5 the whole package sees them — write 'private' where only the module may see one