diff options
| author | gingerBill <bill@gingerbill.org> | 2020-07-14 16:43:23 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-07-14 16:43:23 +0100 |
| commit | 86f1574f7842d7ba1ba06d4141e880133d9e433d (patch) | |
| tree | 97738333130ea5c579f6d1a3691b722df1e29377 /src/check_expr.cpp | |
| parent | 6565a49e344d380d8c7db53fd7455b1fbebd1f49 (diff) | |
Fix #696
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index c33fb4a72..80ff37698 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -9339,6 +9339,14 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type first_arg_name = str_lit("_"); } + if (first_type == nullptr) { + error(se->call, "Selector call expressions expect a procedure type for the call with at least 1 parameter"); + o->mode = Addressing_Invalid; + o->type = t_invalid; + o->expr = node; + return Expr_Stmt; + } + Operand y = {}; y.mode = first_arg->tav.mode; y.type = first_arg->tav.type; |