Skip to content

Error: cannot convert -1 to uint (inside tuples) #13671

@timotheecour

Description

@timotheecour

Error: cannot convert -1 to uint (inside tuples)

Example

const x1 = cast[uint](-1)
discard $x1 # works
discard $(x1,) # Error: cannot convert -1 to uint
# discard $(foo: x1) # Error: cannot convert -1 to uint
# works for object, not tuple

Current Output

const x1 = cast[uint](-1)
discard $x1 # works
discard $(x1,) # Error: cannot convert -1 to uint

Expected Output

works

Additional Information

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