preserves_schema_nim: be more careful about type parameters

This commit is contained in:
Emery Hemingway 2023-02-28 22:09:12 -06:00
parent 10682883a4
commit 3a6dfc0349
1 changed files with 1 additions and 1 deletions

View File

@ -410,7 +410,7 @@ proc embeddingParams(scm: Schema; embeddable: bool): PNode =
newEmpty()
proc identDef(scm: Schema; a, b: PNode; embeddable: bool): PNode =
if embeddable and b.kind notin {nkBracketExpr, nkTupleTy} and
if embeddable and scm.hasEmbeddedType and b.kind notin {nkBracketExpr, nkTupleTy} and
(b.kind != nkIdent or b.ident.s != scm.embeddedIdentString):
nn(nkIdentDefs, a, nn(nkBracketExpr, b, embeddedIdent(scm)), newEmpty())
else: