summary refs log tree commit diff stats
path: root/compiler/semdata.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semdata.nim')
-rwxr-xr-xcompiler/semdata.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/semdata.nim b/compiler/semdata.nim
index 81e45f71c..c28c8c7a1 100755
--- a/compiler/semdata.nim
+++ b/compiler/semdata.nim
@@ -212,7 +212,11 @@ proc markUsed*(n: PNode, s: PSym) =
   if {sfDeprecated, sfError} * s.flags != {}:
     if sfDeprecated in s.flags: Message(n.info, warnDeprecated, s.name.s)
     if sfError in s.flags: LocalError(n.info, errWrongSymbolX, s.name.s)
-  
+
+proc useSym*(sym: PSym): PNode =
+  result = newSymNode(sym)
+  markUsed(result, sym)
+
 proc illFormedAst*(n: PNode) = 
   GlobalError(n.info, errIllFormedAstX, renderTree(n, {renderNoComments}))