Skip to content

Valid uint64 literal says -72057594037927936 can't be converted to uint64. #14522

Closed
@treeform

Description

@treeform
echo 0xFF000000_00000000.uint64
Error: -72057594037927936 can't be converted to uint64

https://play.nim-lang.org/#ix=2nY6

I think its treating all hex literals as signed int64, so it can't accept one that has a negative bit set. Some where in some conversions this happens?

My compiler:

Nim Compiler Version 1.2.0 [Windows: amd64]
Compiled at 2020-04-03
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: 7e83adff84be5d0c401a213eccb61e321a3fb1ff
active boot switches: -d:release

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions