mirror of
https://github.com/status-im/nim-serialization.git
synced 2025-01-12 21:05:21 +00:00
Fix the build on Nim 1.6 (which doesn't allow derefencing nil)
This commit is contained in:
parent
90276771dc
commit
1d33fa3ced
@ -180,7 +180,7 @@ macro customSerialization*(field: untyped, definition): untyped =
|
||||
discard
|
||||
|
||||
template GetFieldType(FT: type FieldTag): type =
|
||||
typeof(field(cast[ptr FT.RecordType](nil)[], FT.fieldName))
|
||||
typeof field(declval(FT.RecordType), FT.fieldName)
|
||||
|
||||
template readFieldIMPL[Reader](field: type FieldTag,
|
||||
reader: var Reader): untyped =
|
||||
|
Loading…
x
Reference in New Issue
Block a user