diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-04-26 14:52:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-26 14:52:58 +0200 |
| commit | f1c1cfb6d2e865e966593ee9815e619b6c581304 (patch) | |
| tree | 0b99532c281b427fb97d8ada3d6fbd53fbb19d9b /src/check_type.cpp | |
| parent | 80df9fbc651aa9c919eaaab822a46d7f5cdad645 (diff) | |
| parent | ba5e33bc3518c327057102f56ac2c1cce55dc76f (diff) | |
Merge pull request #1747 from Kelimion/filename-merge
Filename generation
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index c0ae64baa..51f472961 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -1338,14 +1338,14 @@ ParameterValue handle_parameter_value(CheckerContext *ctx, Type *in_type, Type * } } } - } else if (allow_caller_location && (o.mode == Addressing_Context || are_types_identical(o.type, t_source_code_location))) { + } else if (allow_caller_location && o.mode == Addressing_Context) { param_value.kind = ParameterValue_Value; param_value.ast_value = expr; } else if (o.value.kind != ExactValue_Invalid) { param_value.kind = ParameterValue_Constant; param_value.value = o.value; } else { - error(expr, "Default parameter must be a constant"); + error(expr, "Default parameter must be a constant, %d", o.mode); } } } else { |