diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-15 15:09:47 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-15 15:09:47 +0100 |
| commit | d62f189d7261160a2d3c66bfba2fda182a863fbd (patch) | |
| tree | 529fd2f23159f33764243ba1d27e5a4f6ac99c36 /src/check_expr.cpp | |
| parent | 84713b58e0052d51f2a9e9251d85786c87e3c69e (diff) | |
Remove some dead code
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index b185dd080..f01e9a328 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -662,23 +662,10 @@ i64 check_distance_between_types(CheckerContext *c, Operand *operand, Type *type if (expr->kind == Ast_AutoCast) { Operand x = *operand; x.expr = expr->AutoCast.expr; - bool ok = check_cast_internal(c, &x, type); - if (ok) { + if (check_cast_internal(c, &x, type)) { return MAXIMUM_TYPE_DISTANCE; } - } /*else if (expr->kind == Ast_CallExpr) { - // NOTE(bill, 2021-04-19): Allow assignment of procedure calls with #optional_ok - ast_node(ce, CallExpr, expr); - Type *pt = base_type(type_of_expr(ce->proc)); - if (pt->kind == Type_Proc && pt->Proc.optional_ok) { - Operand x = *operand; - x.type = pt->Proc.results->Tuple.variables[0]->type; - i64 res = check_distance_between_types(c, &x, type); - if (res >= 0) { - return res+1; - } - } - }*/ + } } return -1; |