This commit is contained in:
Felix Krause 2016-06-26 12:41:06 +02:00
parent fb05fcc95f
commit b01270dc9e
1 changed files with 3 additions and 2 deletions

View File

@ -140,7 +140,8 @@ proc constructObject*[T: float|float32|float64](
constructScalarItem(s, item, T):
let hint = guessType(item.scalarContent)
case hint
of yTypeFloat: result = T(parseBiggestFloat(item.scalarContent))
of yTypeFloat:
discard parseBiggestFloat(item.scalarContent, result)
of yTypeFloatInf:
if item.scalarContent[0] == '-': result = NegInf
else: result = Inf
@ -877,4 +878,4 @@ proc dump*[K](value: K, target: Stream, tagStyle: TagStyle = tsRootOnly,
try: present(events, target, serializationTagLibrary, options)
except YamlStreamError:
# serializing object does not raise any errors, so we can ignore this
assert false, "Can never happen"
assert false, "Can never happen"