preserves_schema_nim: embedded literals are not literals
This commit is contained in:
parent
a01ba8c96d
commit
aa5c7f4683
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "20240108"
|
version = "20240114"
|
||||||
author = "Emery Hemingway"
|
author = "Emery Hemingway"
|
||||||
description = "data model and serialization format"
|
description = "data model and serialization format"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
|
|
|
@ -302,9 +302,6 @@ proc isLiteral(loc: Location; sp: SimplePattern): bool =
|
||||||
result = isLiteral(loc, def)
|
result = isLiteral(loc, def)
|
||||||
of SimplepatternKind.lit:
|
of SimplepatternKind.lit:
|
||||||
result = true
|
result = true
|
||||||
of SimplepatternKind.embedded:
|
|
||||||
if not loc.schema.hasEmbeddedType:
|
|
||||||
result = isLiteral(loc, sp.embedded.interface)
|
|
||||||
else: discard
|
else: discard
|
||||||
|
|
||||||
proc isLiteral(loc: Location; np: NamedPattern): bool =
|
proc isLiteral(loc: Location; np: NamedPattern): bool =
|
||||||
|
|
Loading…
Reference in New Issue