diff options
| author | gingerBill <bill@gingerbill.org> | 2024-03-23 14:59:35 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-03-23 14:59:35 +0000 |
| commit | 194d3fe6bd5e48e2e4f9a1fb2fef0a12c81f0952 (patch) | |
| tree | 52d75e3546fb905887f354424af311dd70d5547a /src/check_stmt.cpp | |
| parent | 624b870f2827b330c0e5c8aa887c61cfe3c7b33f (diff) | |
Ignore wrong types
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 04b7359a8..d34695a3a 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -2325,7 +2325,7 @@ gb_internal void check_return_stmt(CheckerContext *ctx, Ast *node) { } } else if (x->kind == Ast_MatrixIndexExpr) { Entity *f = entity_of_node(x->MatrixIndexExpr.expr); - if (is_entity_local_variable(f)) { + if (is_type_matrix(f->type) && is_entity_local_variable(f)) { unsafe_return_error(o, "the address of an indexed variable", f->type); } } |