diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-25 10:27:44 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-25 10:27:44 +0100 |
| commit | ab71acc3a5f6a82fbfb610e18b510f9b980adde8 (patch) | |
| tree | b2f8fadc2ffabdfff64151774f8d8f78048f9950 /src | |
| parent | 0a85d1af6b290d30bc4c171df5fddfef3d09bed6 (diff) | |
Disable `abs` for arrays #254
Diffstat (limited to 'src')
| -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 09c2edbb3..863e0892b 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -3586,7 +3586,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32 case BuiltinProc_abs: { // abs :: proc(n: numeric) -> numeric - if (!is_type_numeric(operand->type)) { + if (!(is_type_numeric(operand->type) && !is_type_array(operand->type))) { gbString type_str = type_to_string(operand->type); error(call, "Expected a numeric type to 'abs', got '%s'", type_str); gb_string_free(type_str); |