-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Using %* to convert a nim structure surrounded by parens crashes
Versions
Nim 0.18
How to reproduce
echo $(%*{"id": "myid"}){"id":"myid"}
echo $(%*({"id": "myid"}))stacktrace
lib/pure/json.nim(789, 36) Error: type mismatch: got <tuple of (string, string)>
but expected one of:
proc `%`(s: string): JsonNode
proc `%`(n: BiggestInt): JsonNode
proc `%`(n: float): JsonNode
proc `%`(b: bool): JsonNode
proc `%`(keyVals: openArray[tuple[key: string, val: JsonNode]]): JsonNode
template `%`(j: JsonNode): JsonNode
proc `%`[T](elements: openArray[T]): JsonNode
proc `%`(formatstr, a: string): string
proc `%`(formatstr: string; a: openArray[string]): string
proc `%`(f: string; t: StringTableRef; flags: set[FormatFlag] = {}): string
proc `%`(o: ref object): JsonNode
proc `%`(o: enum): JsonNode
proc `%`(o: object): JsonNode
Metadata
Metadata
Assignees
Labels
No labels