diff options
author | Araq <rumpf_a@web.de> | 2019-08-20 15:47:04 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-08-20 15:47:04 +0200 |
commit | b1b0960c36540708c77b6e5c950810ee1efb0b12 (patch) | |
tree | 0140d90f96d26459671a0b11d5427b5f385840a6 /compiler | |
parent | 75baaa5e2513cdf348edc155b4f1999a317d9366 (diff) | |
download | Nim-b1b0960c36540708c77b6e5c950810ee1efb0b12.tar.gz |
fixes #11972
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ast.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index 48e8afa67..62a3492cc 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -1660,6 +1660,8 @@ proc getInt64*(a: PNode): int64 {.deprecated: "use getInt".} = proc getFloat*(a: PNode): BiggestFloat = case a.kind of nkFloatLiterals: result = a.floatVal + of nkCharLit, nkUIntLit..nkUInt64Lit, nkIntLit..nkInt64Lit: + result = BiggestFloat a.intVal else: raiseRecoverableError("cannot extract number from invalid AST node") #doAssert false, "getFloat" |