Switch static_type to return Expression& (#887)

This commit is contained in:
Jon Meow
2021-10-14 14:31:06 -07:00
committed by GitHub
parent 52096e4299
commit 924259986a
4 changed files with 41 additions and 41 deletions
@@ -61,7 +61,7 @@ class FunctionDefinition {
auto body() -> std::optional<Nonnull<Statement*>> { return body_; }
// The static type of this function. Cannot be called before typechecking.
auto static_type() const -> Nonnull<const Value*> { return *static_type_; }
auto static_type() const -> const Value& { return **static_type_; }
// Sets the static type of this expression. Can only be called once, during
// typechecking.