Skip to content

JS bool set invalid output with BSD #17093

@beef331

Description

@beef331

Akin to #17076 there is an issue with set[bool] on bsd in js.
CI error

Example

import macros
macro enmRange(enm: typed): untyped = result = newNimNode(nnkCurly).add(enm.getType[1][1..^1])

proc fullSet*(T: typedesc): auto {.inline.} =
  when T is Ordinal:
    {T.low..T.high}
  else: # Hole filled enum
    enmRange(T)
assert fullSet(bool) == {true, false}

Current Output

Program fails at runtime for whatever reason.

`fullSet(bool) == {true, false}`  [AssertionDefect]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions