diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-11-30 14:12:01 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-11-30 14:12:01 -0500 |
| commit | 4d8aa867c7f4661167a4742fbdd865ed2449503e (patch) | |
| tree | 67c9aeedaa3eb36585d1747e1f96e8c4708fc707 /src/typecheck.c | |
| parent | d302aaec38b9d295d39c4d87b53ee610bc9e0e07 (diff) | |
Add `base` parameter to integer parsing functions
Diffstat (limited to 'src/typecheck.c')
| -rw-r--r-- | src/typecheck.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/typecheck.c b/src/typecheck.c index 37f4fcab..e432759b 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -14,6 +14,7 @@ #include "naming.h" #include "parse/files.h" #include "parse/types.h" +#include "stdlib/optionals.h" #include "stdlib/paths.h" #include "stdlib/tables.h" #include "stdlib/text.h" @@ -1659,7 +1660,7 @@ PUREFUNC bool is_constant(env_t *env, ast_t *ast) { case None: return true; case Int: { DeclareMatch(info, ast, Int); - Int_t int_val = Int$parse(Text$from_str(info->str), NULL); + Int_t int_val = Int$parse(Text$from_str(info->str), NONE_INT, NULL); if (int_val.small == 0) return false; // Failed to parse return (Int$compare_value(int_val, I(BIGGEST_SMALL_INT)) <= 0); } |
