Revert "Handle record types with when statements"
This reverts commit dfd6e349a6
.
This commit is contained in:
parent
32fce5df8d
commit
261de741b7
|
@ -131,15 +131,14 @@ macro enumAllSerializedFieldsImpl(T: type, body: untyped): untyped =
|
||||||
|
|
||||||
result.add quote do:
|
result.add quote do:
|
||||||
block:
|
block:
|
||||||
when compiles(type(`field`)):
|
`fieldNameDefs`
|
||||||
`fieldNameDefs`
|
|
||||||
|
|
||||||
type FieldType {.inject, used.} = type(`field`)
|
type FieldType {.inject, used.} = type(`field`)
|
||||||
|
|
||||||
template fieldCaseDiscriminator: auto {.used.} = `discriminator`
|
template fieldCaseDiscriminator: auto {.used.} = `discriminator`
|
||||||
template fieldCaseBranches: auto {.used.} = `branches`
|
template fieldCaseBranches: auto {.used.} = `branches`
|
||||||
|
|
||||||
`body`
|
`body`
|
||||||
|
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue