You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
proc`==`[T](a, b: set[T]): bool=debugEcho (a.card, b.card)
debugEcho (a, b)
debugEcho"---"# <----- uncommentif a.card == b.card:
for i in a:
if i notin b:
returnfalsetrueelse: falsewhenisMainModule:
let
s1: set['a'..'g'] = {'a', 'e'}
# s2: set['a' .. 'g'] = {'b', 'c', 'd', 'f'} # this works fine
s2 = {'b', 'c', 'd', 'f'}
echo s1 == s2
Current Output
when line debugEcho "---" is not commented:
(2, 3)
({'a', 'e'}, {'f', 'g'})
---
false
when that line is commented:
(2, 2)
({'a', 'e'}, {'f'})
false
Additional Information
Nim Compiler Version 1.6.6 [Windows: amd64]
Compiled at 2022-05-05
Copyright (c) 2006-2021 by Andreas Rumpf
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
hamidb80
changed the title
passing 2 sets with 2 different ranges to a proc is not consistent
passing 2 sets with 2 different ranges to a proc is not consistent
Aug 3, 2022
playground
Example
Current Output
when line
debugEcho "---"
is not commented:when that line is commented:
Additional Information
The text was updated successfully, but these errors were encountered: