schema: emit "tuple[]" for literal object fields

This commit is contained in:
Emery Hemingway 2023-05-04 10:55:09 +01:00
parent cd2dde6d71
commit b9d8275624
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Package
version = "20230503"
version = "20230504"
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"bool"))
recList.add identDef(scm, id, TypeSpec(node: ident"tuple[]"))
elif sp.orKind == SimplePatternKind.embedded and not scm.hasEmbeddedType:
let id = nn(nkPragmaExpr,
id, nn(nkPragma, ident"preservesEmbedded"))