aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-05-22 12:53:29 +0100
committergingerBill <bill@gingerbill.org>2023-05-22 12:53:29 +0100
commit8bf32ac697ea21ff3b37e5b31fe0fc10e700c9a4 (patch)
tree77e96ea43b5faf78d81ca1d8158db59fe3e24add /src/check_type.cpp
parent540f724b1f57d0d5a40b65a59f6ee82e070c6ee5 (diff)
Minor change to handling of propagation of errors with `---` as a value
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index dfe774f6b..bbfc25a12 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -135,7 +135,7 @@ gb_internal void check_struct_fields(CheckerContext *ctx, Ast *node, Slice<Entit
type = t_invalid;
}
if (is_type_untyped(type)) {
- if (is_type_untyped_undef(type)) {
+ if (is_type_untyped_uninit(type)) {
error(params[i], "Cannot determine parameter type from ---");
} else {
error(params[i], "Cannot determine parameter type from a nil");
@@ -473,7 +473,7 @@ gb_internal Type *check_record_polymorphic_params(CheckerContext *ctx, Ast *poly
type = t_invalid;
}
if (is_type_untyped(type)) {
- if (is_type_untyped_undef(type)) {
+ if (is_type_untyped_uninit(type)) {
error(params[i], "Cannot determine parameter type from ---");
} else {
error(params[i], "Cannot determine parameter type from a nil");
@@ -1528,7 +1528,7 @@ gb_internal Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_para
type = t_invalid;
}
if (is_type_untyped(type)) {
- if (is_type_untyped_undef(type)) {
+ if (is_type_untyped_uninit(type)) {
error(param, "Cannot determine parameter type from ---");
} else {
error(param, "Cannot determine parameter type from a nil");