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