aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-02 18:47:39 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-02 18:47:39 -0400
commit61e482f6f36aee6f72392a6188f2ec5c858b88fd (patch)
treebea4123fcc62dd834405ae89ce9fe260e90a0023 /typecheck.c
parentf0f8f218703ebb4512b3cd3f9e06b86a7d9861b0 (diff)
Initial WIP first past
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/typecheck.c b/typecheck.c
index bb40666f..4d4c080e 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -9,11 +9,12 @@
#include <sys/stat.h>
#include "ast.h"
+#include "builtins/text.h"
+#include "builtins/util.h"
#include "environment.h"
#include "parse.h"
#include "typecheck.h"
#include "types.h"
-#include "builtins/util.h"
type_t *parse_type_ast(env_t *env, type_ast_t *ast)
{
@@ -1367,7 +1368,7 @@ bool is_constant(env_t *env, ast_t *ast)
case Int: {
auto info = Match(ast, Int);
if (info->bits == IBITS_UNSPECIFIED) {
- Int_t int_val = Int$from_text(info->str, NULL);
+ Int_t int_val = Int$from_text(Text$from_str(info->str), NULL);
mpz_t i;
mpz_init_set_int(i, int_val);
return (mpz_cmpabs_ui(i, BIGGEST_SMALL_INT) <= 0);