Skip to content

raiseAssert generates a redefinition of 'result`gensym646'? #25246

@richard-ramos

Description

@richard-ramos

Nim Version

2.0.17

Description

In this repository/pr: vacp2p/nim-libp2p#1797 lines that look like

doAssert false, "some message"

were replaced by

raiseAssert "some message"

When doing this, a compilation error appears when executing nimble test

Current Output

/home/runner/work/nim-libp2p/nim-libp2p/libp2p/discovery/rendezvousinterface.nim(42, 21) template/generic instantiation of `request` from here
/home/runner/work/nim-libp2p/nim-libp2p/libp2p/protocols/rendezvous/rendezvous.nim(461, 37) template/generic instantiation of `setResult` from here
/home/runner/work/nim-libp2p/nim-libp2p/nim/lib/pure/collections/sequtils.nim(1025, 13) Error: redefinition of 'result`gensym646'; previous declaration here: /home/runner/work/nim-libp2p/nim-libp2p/nim/lib/pure/collections/sequtils.nim(863, 11)
stack trace: (most recent call last)

Expected Output

libp2p/protocols/rendezvous/rendezvous.nim should have compiled succesfully

Known Workarounds

No response

Additional Information

This error does not appear when using 2.0.16, or newer like 2.2.4.

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