Handle identifier value category properly. (#986)

This commit is contained in:
Geoff Romer
2021-12-15 13:27:36 -08:00
committed by GitHub
parent daf8729a75
commit c89ce1d570
9 changed files with 99 additions and 48 deletions
+2
View File
@@ -118,6 +118,8 @@ class BindingPattern : public Pattern {
auto type() const -> const Pattern& { return *type_; }
auto type() -> Pattern& { return *type_; }
auto value_category() const -> ValueCategory { return ValueCategory::Var; }
private:
std::optional<std::string> name_;
Nonnull<Pattern*> type_;