Skip to content

Cannot print unsigned integer constant #6838

@markus-oberhumer

Description

@markus-oberhumer

This issue was extracted from #6829 (comment) :

test.nim(10, 8) Error: cannot convert -1 to uint64

when sizeof(int) == 8:
  var a   = 18446744073709551615'u64.uint
  const b = 18446744073709551615'u64.uint

  doAssert a is uint
  doAssert b is uint
  doAssert a == b

  echo a
  echo b # DOES NOT COMPILE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions