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:
Geoff Romer
2021-12-03 13:52:31 -08:00
committed by GitHub
parent b83f00225a
commit f75b4d322f
14 changed files with 163 additions and 266 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ class NamedEntity : public virtual AstNode {
class StaticScope {
public:
// Defines `name` to be `entity` in this scope, or reports a compilation error
// if `name` is already defined in this scope.
// if `name` is already defined to be a different entity in this scope.
void Add(std::string name, Nonnull<const NamedEntity*> entity);
// Make `parent` a parent of this scope.