diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-05-10 17:06:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 11:06:14 +0200 |
commit | deaf6843752112cfaadc688302c94779d633c686 (patch) | |
tree | 6a15079afca37a564ea73b4e1ee1bf51055c319b /lib/pure | |
parent | 4b76037e5fe14f75ac5381a0d08ad509f450cf56 (diff) | |
download | Nim-deaf6843752112cfaadc688302c94779d633c686.tar.gz |
fix #9423 followup #17594: distinct generics now work in VM (#21816)
* fix #9423 distinct generics now work in vm * fixes cpp tests --------- Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/json.nim | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim index 7ccd3c43f..b68ddd660 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -1211,13 +1211,7 @@ macro assignDistinctImpl[T: distinct](dst: var T;jsonNode: JsonNode; jsonPath: v let baseTyp = typImpl[0] result = quote do: - when nimvm: - # workaround #12282 - var tmp: `baseTyp` - initFromJson( tmp, `jsonNode`, `jsonPath`) - `dst` = `typInst`(tmp) - else: - initFromJson( `baseTyp`(`dst`), `jsonNode`, `jsonPath`) + initFromJson(`baseTyp`(`dst`), `jsonNode`, `jsonPath`) proc initFromJson[T: distinct](dst: var T; jsonNode: JsonNode; jsonPath: var string) = assignDistinctImpl(dst, jsonNode, jsonPath) |