mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 17:31:07 +01:00
Handle identifier value category properly. (#986)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "executable_semantics/ast/pattern.h"
|
||||
#include "executable_semantics/ast/source_location.h"
|
||||
#include "executable_semantics/ast/static_scope.h"
|
||||
#include "executable_semantics/ast/value_category.h"
|
||||
#include "executable_semantics/common/arena.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
@@ -344,6 +345,8 @@ class Continuation : public Statement {
|
||||
// and after typechecking it's guaranteed to be true.
|
||||
auto has_static_type() const -> bool { return static_type_.has_value(); }
|
||||
|
||||
auto value_category() const -> ValueCategory { return ValueCategory::Var; }
|
||||
|
||||
private:
|
||||
std::string continuation_variable_;
|
||||
Nonnull<Block*> body_;
|
||||
|
||||
Reference in New Issue
Block a user