diff options
| author | gingerBill <bill@gingerbill.org> | 2019-05-06 18:29:22 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-05-06 18:29:22 +0100 |
| commit | 00c0ce45b3ced29c56866830d5d9e407e70949e7 (patch) | |
| tree | 10131014f5b260c304271c74720bd4af24e60c07 /src/check_expr.cpp | |
| parent | ab0afa548b40ea3c0be6ebcbe1571cd6c3569021 (diff) | |
Fix bug with `clamp`
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 405316220..d81760211 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -4076,7 +4076,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32 case BuiltinProc_clamp: { // clamp :: proc(a, min, max: ordered) -> ordered - Type *type = base_type(operand->type); + Type *type = operand->type; if (!is_type_ordered(type) || !(is_type_numeric(type) || is_type_string(type))) { gbString type_str = type_to_string(operand->type); error(call, "Expected a ordered numeric or string type to 'clamp', got '%s'", type_str); |