workaround to allow compile time deserialization
with this refactoring, deserialization can be enabled for VM context see toml-serialization for example
This commit is contained in:
parent
d856d6ece5
commit
90276771dc
|
@ -225,8 +225,9 @@ proc makeFieldReadersTable(RecordType, ReaderType: distinct type):
|
|||
except SerializationError as err:
|
||||
raise err
|
||||
except CatchableError as err:
|
||||
type LocalRecordType = `RecordType` # workaround to allow compile time evaluation
|
||||
reader.handleReadException(
|
||||
`RecordType`,
|
||||
LocalRecordType,
|
||||
fieldName,
|
||||
when RecordType is tuple: obj[i] else: field(obj, realFieldName),
|
||||
err)
|
||||
|
|
Loading…
Reference in New Issue