aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-17 20:07:04 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-17 20:07:04 -0500
commitb34c5c57740bd819551d74554533931e89d3caf0 (patch)
treecee3e3a2b0f75390cef2799ae5c5f41124898ab5 /typecheck.c
parentf521a99d003c7f416a5573e975aa0657c027e470 (diff)
Fix up doctests
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/typecheck.c b/typecheck.c
index a44c60b1..33e2b122 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -92,6 +92,10 @@ type_t *get_math_type(env_t *env, ast_t *ast, type_t *lhs_t, type_t *rhs_t)
void bind_statement(env_t *env, ast_t *statement)
{
switch (statement->tag) {
+ case DocTest: {
+ bind_statement(env, Match(statement, DocTest)->expr);
+ break;
+ }
case Declare: {
auto decl = Match(statement, Declare);
type_t *type = get_type(env, decl->value);