diff options
| author | gingerBill <bill@gingerbill.org> | 2018-03-04 09:25:02 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-03-04 09:25:02 +0000 |
| commit | 584dffea1420b1e2ce98922f8dd5cf63e5fb8872 (patch) | |
| tree | e06a3a30fe31a90c2fcb77eb0fa4667d138f86ff /src/check_expr.cpp | |
| parent | 41b6d215bb381ecb4190acd8cbde481442b7ab85 (diff) | |
Remove dead code; fix referencing of a type assertion in a selector expression
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 16145109f..94a710ada 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1354,6 +1354,9 @@ void check_is_expressible(Checker *c, Operand *o, Type *type) { bool check_is_not_addressable(Checker *c, Operand *o) { if (o->mode == Addressing_OptionalOk) { AstNode *expr = unparen_expr(o->expr); + while (expr->kind == AstNode_SelectorExpr) { + expr = expr->SelectorExpr.selector; + } if (expr->kind != AstNode_TypeAssertion) { return true; } |