thugeset.nim 362 B

1234567891011
  1. let x = 20_000
  2. let s = {x, 123} #[tt.Warning
  3. ^ type 'int' is too big to be a `set` element, assuming a range of 0..65535, explicitly write this range to get rid of warning [AboveMaxSizeSet]]#
  4. doAssert x in s
  5. doAssert 20_000 in s
  6. {.push warningAsError[AboveMaxSizeSet]: on.}
  7. let s2 = {range[0..65535](x), 123}
  8. doAssert x in s
  9. doAssert 20_000 in s
  10. {.pop.}