mirror of
https://github.com/odin-lang/Odin.git
synced 2026-05-28 14:45:09 +00:00
Remove dead code; fix referencing of a type assertion in a selector expression
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user