Files
Nim/tests/stdlib/tjsonutilssandwich.nim
metagn 5c71fbab30 fix jsonutils with generic sandwiches, don't use strformat (#24560)
fixes #24559

The strformat macros have the problem that they don't capture symbols,
so don't use them in the generic `fromJson` proc here. Also `fromJson`
refers to `jsonTo` before it is declared which doesn't capture it, so
it's now forward declared.
2024-12-23 06:08:46 +01:00

11 lines
174 B
Nim

discard """
action: compile
"""
# issue #24559
import mjsonutilssandwich
# import std/[json, jsonutils] # Add this line and everything works 🤡
unserialize[Foo]("{}")