schema: emit "tuple[]" for literal object fields
This commit is contained in:
parent
cd2dde6d71
commit
b9d8275624
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
|
||||
version = "20230503"
|
||||
version = "20230504"
|
||||
author = "Emery Hemingway"
|
||||
description = "data model and serialization format"
|
||||
license = "Unlicense"
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue