diff options
| author | gingerBill <bill@gingerbill.org> | 2024-06-11 13:10:26 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-06-11 13:10:26 +0100 |
| commit | e66d71e9cf1389b0cb04d07452d99115357b350f (patch) | |
| tree | 59eb6396a3af77a2c77648807701df12bd0fa27a | |
| parent | a8ec2c06f3f0424e03ab3105b8a3f77907bf6343 (diff) | |
Fix type_info usage
| -rw-r--r-- | src/checker.cpp | 1 | ||||
| -rw-r--r-- | src/tilde_const.cpp | 2 | ||||
| -rw-r--r-- | src/tilde_type_info.cpp | 4 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 852fb89bb..69183321e 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -2204,7 +2204,6 @@ gb_internal void check_procedure_later(Checker *c, AstFile *file, Token token, D check_procedure_later(c, info); } - gb_internal void add_min_dep_type_info(Checker *c, Type *t) { if (t == nullptr) { return; diff --git a/src/tilde_const.cpp b/src/tilde_const.cpp index ce6b0eb82..54bcba581 100644 --- a/src/tilde_const.cpp +++ b/src/tilde_const.cpp @@ -950,7 +950,7 @@ gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const case ExactValue_Integer: GB_ASSERT(!TB_IS_VOID_TYPE(dt)); - // GB_ASSERT(dt.raw != TB_TYPE_I128.raw); + GB_ASSERT(dt.raw != TB_TYPE_I128.raw); if (is_type_unsigned(type)) { u64 i = 0; if (value.kind == ExactValue_Integer && value.value_integer.sign) { diff --git a/src/tilde_type_info.cpp b/src/tilde_type_info.cpp index 5d244a7ee..cbe0e747b 100644 --- a/src/tilde_type_info.cpp +++ b/src/tilde_type_info.cpp @@ -23,10 +23,10 @@ gb_internal isize cg_type_info_index(CheckerInfo *info, Type *type, bool err_on_ auto *set = &info->minimum_dependency_type_info_set; isize index = type_info_index(info, type, err_on_not_found); if (index >= 0) { - auto *found = map_get(set, index); + auto *found = map_get(set, index+1); if (found) { GB_ASSERT(*found >= 0); - return *found + 1; + return *found; } } if (err_on_not_found) { |