From 52f9a112d0279f3480822ac94600380fcd06d782 Mon Sep 17 00:00:00 2001 From: mratsim Date: Wed, 11 Sep 2019 10:50:44 -0400 Subject: [PATCH] ByteStreamVar doesn't autodereference to ByteStream, fix https://github.com/status-im/nim-beacon-chain/pull/436#issuecomment-530391076 --- serialization.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serialization.nim b/serialization.nim index 7eb51b5..43aa1ff 100644 --- a/serialization.nim +++ b/serialization.nim @@ -89,7 +89,7 @@ template loadFile*(Format: distinct type, params: varargs[untyped]): auto = mixin init, ReaderType var stream = openFile(filename) - defer: stream.close() # TODO: destructors + defer: stream[].close() # TODO: destructors # TODO: # Remove this when statement once the following bug is fixed: