mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-14 06:18:32 +00:00
When exporting `X` from Carbon package `Foo`, expose it to C++ with fully-qualified name `Carbon::Foo::X`, not simply `Carbon::X`. This ensures that C++ mangled names properly distinguish between same-named Carbon entities in different packages. Name *lookup* into `Carbon::` still uses the same rules as before: it finds what a `package.` lookup would find in Carbon. So `X` is named from C++ as `Carbon::X` still, and a lookup for `Carbon::Foo` fails, even though `X`'s "true name" is now `Carbon::Foo::X`. Assisted-by: Gemini via Antigravity