Revert "preserves_schema_nim: declare literal fields as void"

This reverts commit 30c330cecf.
This commit is contained in:
Emery Hemingway 2023-04-30 09:57:45 +01:00
parent 305edff213
commit 67b470078c
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Package
version = "20230428"
version = "20230410"
author = "Emery Hemingway"
description = "data model and serialization format"
license = "Unlicense"

View File

@ -513,7 +513,7 @@ proc addField(recList: PNode; loc: Location; known: var TypeTable; sp: SimplePat
nn(nkExprColonExpr,
ident"preservesLiteral",
toStrLit(loc, sp))))
recList.add identDef(scm, id, TypeSpec(node: ident"void"))
recList.add identDef(scm, id, TypeSpec(node: ident"bool"))
elif sp.orKind == SimplePatternKind.embedded and not scm.hasEmbeddedType:
let id = nn(nkPragmaExpr,
id, nn(nkPragma, ident"preservesEmbedded"))