diff options
| author | spiel0meister <soviczan7@gmail.com> | 2025-06-03 14:46:44 +0200 |
|---|---|---|
| committer | spiel0meister <soviczan7@gmail.com> | 2025-06-03 14:46:44 +0200 |
| commit | d1fcec63cc9c34e13b20d5815abdba7ae80b78c1 (patch) | |
| tree | 1077f5bcc19b7939fe3e1e494d375bad7e9ba67c /src/check_expr.cpp | |
| parent | 648fa9e54a4f7e9ef5ee03f8cbb931a05ab58e56 (diff) | |
early return; fix indentation
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 2287ea40b..e3186a9b1 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -263,13 +263,14 @@ gb_internal void check_did_you_mean_scope(String const &name, Scope *scope, char gb_internal Entity *entity_from_expr(Ast *expr) { expr = unparen_expr(expr); - if (expr != nullptr) { - switch (expr->kind) { - case Ast_Ident: - return expr->Ident.entity; - case Ast_SelectorExpr: - return entity_from_expr(expr->SelectorExpr.selector); - } + if (expr == nullptr) { + return nullptr; + } + switch (expr->kind) { + case Ast_Ident: + return expr->Ident.entity; + case Ast_SelectorExpr: + return entity_from_expr(expr->SelectorExpr.selector); } return nullptr; } |