Browse Source

Add entity use when `using` is applied to a variable declaration

gingerBill 6 years ago
parent
commit
9dabbc2c95
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/check_stmt.cpp

+ 2 - 0
src/check_stmt.cpp

@@ -1835,6 +1835,8 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
 								}
 								}
 							}
 							}
 						}
 						}
+
+						add_entity_use(ctx, nullptr, e);
 					} else {
 					} else {
 						// NOTE(bill): skip the rest to remove extra errors
 						// NOTE(bill): skip the rest to remove extra errors
 						error(token, "'using' can only be applied to variables of type struct or raw_union");
 						error(token, "'using' can only be applied to variables of type struct or raw_union");