Module-owned type identity
A nominal type's declaring module is part of its identity. Two modules may both export Flag; their values remain distinct even if the variants look identical.
Use a module prefix on types, constructors, and patterns to state which declaration you mean. Bare lookup prefers the declaration in the current module.
use cli
use web
fn main() {
println(cli.show(cli.Flag.On))
println(web.show(web.Flag.On))
}
Examples use the moon toolchain version shown beside each result.
Output & diagnostics
Expected: cli:on web:on
Ctrl/⌘+Enter runs the current lesson.