mirror of
https://github.com/status-im/nim-serialization.git
synced 2025-01-13 05:14:46 +00:00
temporary work-around for a Nim bug
This commit is contained in:
parent
89a2105376
commit
36cf03f7a9
@ -12,8 +12,11 @@ template customSerialization* {.pragma.}
|
||||
## TODO: deprecate this in favor of readField(T, field, InputArchive)
|
||||
|
||||
template eachSerializedFieldImpl*[T](x: T, op: untyped) =
|
||||
when false:
|
||||
static: echo treeRepr(T.getTypeImpl)
|
||||
|
||||
for k, v in fieldPairs(x):
|
||||
when not hasCustomPragma(v, dontSerialize):
|
||||
when true: # not hasCustomPragma(v, dontSerialize):
|
||||
op(k, v)
|
||||
|
||||
proc totalSerializedFieldsImpl(T: type): int =
|
||||
|
Loading…
x
Reference in New Issue
Block a user