Commit a469720
committed
Remove re-definition of
Commit ebee42e ("A little cleanup around set types.", 2021-10-01)
added an exported definition of `SomeSet` that included the
built-in `set` type.
However, a typical Nim user is familiar with the definition of `SomeSet`
in the standard library of
SomeSet*[A] = HashSet[A] | OrderedSet[A]
and was thus likely to read the lines
proc parseHook*[T](s: string, i: var int, v: var SomeSet[T]) =
and
proc dumpHook*[T](s: var string, v: SomeSet[T]) =
and believe that jsony does not support the built-in `set` type.
This commit therefore removes the `SomeSet` re-definition, which also
means that jsony once again works with code like
import std/sets
import pkg/jsony
proc foo[T](s: SomeSet[T]) =
discard
which successfully compiled with jsony 1.0.5 and earlier, but produced
an error with jsony 1.1.0 (2021-11-04):
/tmp/foo.nim(4, 16) Error: ambiguous identifier: 'SomeSet' -- use one of the following:
sets.SomeSet: SomeSet
jsony.SomeSet: SomeSet
Support for the built-in `set` type was originally added by
commit 9a4f118 (2021-10-01).
Fixes: #33SomeSet
1 parent d7070a7 commit a469720
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
| 18 | + | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| |||
453 | 451 | | |
454 | 452 | | |
455 | 453 | | |
456 | | - | |
457 | | - | |
| 454 | + | |
| 455 | + | |
458 | 456 | | |
459 | 457 | | |
460 | 458 | | |
| |||
757 | 755 | | |
758 | 756 | | |
759 | 757 | | |
760 | | - | |
| 758 | + | |
761 | 759 | | |
762 | 760 | | |
763 | 761 | | |
| |||
0 commit comments