Fixed bug with serialize-into and primitives

This commit is contained in:
Joshua Suskalo 2021-09-30 20:15:58 -05:00
parent e714e376ef
commit 66eefc7a13
2 changed files with 3 additions and 1 deletions

View file

@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
## [Unreleased]
### Fixed
- Invalid implementation of serialize-into for primitive types
## [0.1.192] - 2021-09-30
### Added

View file

@ -352,7 +352,7 @@
(defmethod serialize-into :default
[obj type segment scope]
(if-some [prim-layout (primitive-type type)]
(with-acquired [(segment-scope scope) scope]
(with-acquired [(segment-scope segment) scope]
(serialize-into (serialize* obj type scope) prim-layout segment scope))
(throw (ex-info "Attempted to serialize an object to a type that has not been overriden"
{:type type