aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-11-21 10:25:34 +0000
committergingerBill <bill@gingerbill.org>2022-11-21 10:25:34 +0000
commit27d56d0da4c32fae3b52d8dcff65f111119b8d45 (patch)
treed4b7ac581e72867fc4bdc784e2a90f8cf50de3a7 /src
parentc663566cd5778bfe6782835e897e212f91d5b1cb (diff)
Fix #2125
Diffstat (limited to 'src')
-rw-r--r--src/check_expr.cpp3
-rw-r--r--src/check_type.cpp2
-rw-r--r--src/llvm_backend_debug.cpp1
3 files changed, 6 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index c58aac609..d5c75f7b7 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -5525,6 +5525,8 @@ CALL_ARGUMENT_CHECKER(check_named_call_arguments) {
GB_ASSERT(is_type_proc(gept));
proc_type = gept;
pt = &gept->Proc;
+ } else {
+ err = CallArgumentError_WrongTypes;
}
}
@@ -6156,6 +6158,7 @@ CallArgumentData check_call_arguments(CheckerContext *c, Operand *operand, Type
}
result_type = t_invalid;
} else {
+ GB_ASSERT(valids.count == 1);
Ast *ident = operand->expr;
while (ident->kind == Ast_SelectorExpr) {
Ast *s = ident->SelectorExpr.selector;
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 4d94fce6c..0cdc3a930 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -1629,6 +1629,8 @@ Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_params, bool *is
// This is just to add the error message to determine_type_from_polymorphic which
// depends on valid position information
op.expr = _params;
+ op.mode = Addressing_Invalid;
+ op.type = t_invalid;
}
if (is_type_polymorphic_type) {
type = determine_type_from_polymorphic(ctx, type, op);
diff --git a/src/llvm_backend_debug.cpp b/src/llvm_backend_debug.cpp
index e69424929..60978d321 100644
--- a/src/llvm_backend_debug.cpp
+++ b/src/llvm_backend_debug.cpp
@@ -294,6 +294,7 @@ LLVMMetadataRef lb_debug_type_internal(lbModule *m, Type *type) {
GB_PANIC("Type_Named should be handled in lb_debug_type separately");
case Type_SoaPointer:
+ return LLVMDIBuilderCreatePointerType(m->debug_builder, lb_debug_type(m, type->SoaPointer.elem), word_bits, word_bits, 0, nullptr, 0);
case Type_Pointer:
return LLVMDIBuilderCreatePointerType(m->debug_builder, lb_debug_type(m, type->Pointer.elem), word_bits, word_bits, 0, nullptr, 0);
case Type_MultiPointer: