diff options
Diffstat (limited to 'compiler/ast.nim')
-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" |