silence declared but not used warning

This commit is contained in:
jangko 2020-08-05 11:25:46 +07:00 committed by zah
parent 5b11c41731
commit 474bdbf49c
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ template enumInstanceSerializedFields*(obj: auto,
## will be read first and the iteration will continue depending on the
## value being deserialized.
##
type ObjType = type(obj)
type ObjType {.used.} = type(obj)
for fieldName, fieldVar in fieldPairs(obj):
when not hasCustomPragmaFixed(ObjType, fieldName, dontSerialize):