Browse Source

Add extra explicit entity usage

gingerBill 6 years ago
parent
commit
cf94d1735d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/check_type.cpp

+ 2 - 0
src/check_type.cpp

@@ -1752,6 +1752,8 @@ Type *check_get_results(CheckerContext *ctx, Scope *scope, Ast *_results) {
 				param->Variable.param_value = param_value;
 				array_add(&variables, param);
 				add_entity(ctx->checker, scope, name, param);
+				// NOTE(bill): Removes `declared but not used` when using -vet
+				add_entity_use(ctx, name, param);
 			}
 		}
 	}