diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 0eca029d3..24ee86810 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -3808,7 +3808,14 @@ gb_internal bool check_cast_internal(CheckerContext *c, Operand *x, Type *type) gb_internal void check_cast(CheckerContext *c, Operand *x, Type *type, bool forbid_identical = false) { if (!is_operand_value(*x)) { + ERROR_BLOCK(); error(x->expr, "Only values can be casted"); + if (is_type_typeid(type)) { + gbString expr_str = expr_to_string(x->expr); + defer (gb_string_free(expr_str)); + + error_line("\tSuggestion: 'typeid_of(%s)'", expr_str); + } x->mode = Addressing_Invalid; return; } diff --git a/src/checker.cpp b/src/checker.cpp index 539be0666..2f66d3e60 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -2875,9 +2875,11 @@ gb_internal void collect_testing_procedures_of_package(Checker *c, AstPackage *p InternedString interned = string_interner_insert(str_lit("Test_Signature"), 0, &hash); Entity *test_signature = scope_lookup_current(testing_scope, interned, hash); - Scope *s = pkg->scope; - for (auto const &entry : s->elements) { - Entity *e = entry.value; + for_array(i, c->info.entities) { + Entity *e = c->info.entities[i]; + if (e->pkg != pkg) { + continue; + } if (e->kind != Entity_Procedure) { continue; } diff --git a/src/exact_value.cpp b/src/exact_value.cpp index 525b8cb91..fa26ec4b0 100644 --- a/src/exact_value.cpp +++ b/src/exact_value.cpp @@ -337,7 +337,10 @@ gb_internal ExactValue exact_value_float_from_string(String string) { f64 f = bit_cast(u); return exact_value_float(f); } else { - GB_PANIC("Invalid hexadecimal float, expected 8 or 16 digits, got %td", digit_count); + // GB_PANIC("Invalid hexadecimal float, expected 4, 8, or 16 digits, got %td", digit_count); + // NOTE(bill): This should be caught by the tokenizer, so just pretend it's an f64 + f64 f = bit_cast(u); + return exact_value_float(f); } } diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 15ff125d4..7a1f99955 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -2043,7 +2043,8 @@ gb_internal bool lb_init_global_var(lbModule *m, lbProcedure *p, Entity *e, Ast GB_ASSERT(!var.is_initialized); Type *t = type_deref(var.var.type); - if (is_type_any(t)) { + // NOTE: 'any' literals or 'any's that point to other variables can be handled by the generic path + if (is_type_any(t) && !is_type_any(var.init.type) && init_expr->tav.mode != Addressing_Variable) { // NOTE(bill): Edge case for 'any' type Type *var_type = default_type(var.init.type); gbString var_name = gb_string_make(permanent_allocator(), "__$global_any::"); diff --git a/src/types.cpp b/src/types.cpp index 135461874..c3a997562 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -5043,9 +5043,15 @@ gb_internal isize check_is_assignable_to_using_subtype(Type *src, Type *dst, isi return level+1; } } - isize nested_level = check_is_assignable_to_using_subtype(f->type, dst, level+1, src_is_ptr, allow_polymorphic); - if (nested_level > 0) { - return nested_level; + // Only follow the chain transitively when the field also has `using`, which is + // what the backend's lookup_subtype_polymorphic_selection requires (it gates + // recursion on EntityFlag_Using). A plain `#subtype`-only field enables a + // single-hop conversion but not a two-or-more hop transitive one. + if (f->flags & EntityFlag_Using) { + isize nested_level = check_is_assignable_to_using_subtype(f->type, dst, level+1, src_is_ptr, allow_polymorphic); + if (nested_level > 0) { + return nested_level; + } } } diff --git a/vendor/curl/curl.odin b/vendor/curl/curl.odin index 41ecbcb75..6ecc8030f 100644 --- a/vendor/curl/curl.odin +++ b/vendor/curl/curl.odin @@ -18,8 +18,6 @@ when ODIN_OS == .Windows { @(export) foreign import lib { "system:curl", - "system:mbedx509", - "system:mbedcrypto", "system:z", "system:SystemConfiguration.framework", }