mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Handle use-before-declare in static name lookup (#967)
Also remove inheritance from NamedEntity for some classes that don't need it.
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "executable_semantics/ast/declaration.h"
|
||||
#include "executable_semantics/ast/library_name.h"
|
||||
#include "executable_semantics/ast/static_scope.h"
|
||||
#include "executable_semantics/common/nonnull.h"
|
||||
|
||||
namespace Carbon {
|
||||
@@ -24,8 +23,6 @@ struct AST {
|
||||
std::vector<LibraryName> imports;
|
||||
// The file's ordered declarations.
|
||||
std::vector<Nonnull<Declaration*>> declarations;
|
||||
// Names declared at the top level of the file.
|
||||
StaticScope static_scope;
|
||||
// Synthesized call to `Main`. Injected after parsing.
|
||||
std::optional<Nonnull<CallExpression*>> main_call;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user