mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 09:41:08 +01:00
Add support for most kinds of declarations to be declared and used as namespace members (#2575)
Support for global variables is still missing; they're a bit more tricky because they use a pattern to introduce their name. Prior to this change, explorer heavily relied on name comparisons to determine whether two declarations declare the same entity. Some of those instances are fixed in this PR, but more remain to be fixed, and some TODOs are added for some harder-to-fix instances.
This commit is contained in:
@@ -64,7 +64,7 @@ auto ProtoToCarbonWithMain(const Fuzzing::CompilationUnit& compilation_unit)
|
||||
compilation_unit.declarations().end(),
|
||||
[](const Fuzzing::Declaration& decl) {
|
||||
return decl.kind_case() == Fuzzing::Declaration::kFunction &&
|
||||
decl.function().name() == "Main";
|
||||
decl.function().name().name() == "Main";
|
||||
});
|
||||
return Carbon::ProtoToCarbon(compilation_unit) + (has_main ? "" : EmptyMain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user