mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:11:09 +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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user