Tenative fix for yet another yearly binding problem

This commit is contained in:
Zahary Karadjov 2019-11-12 00:33:20 +00:00
parent b42717a73a
commit 4e487bedf1
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 1 additions and 1 deletions

View File

@ -590,7 +590,7 @@ macro generateFieldSetters(RecordType: type): untyped =
when `configField` is enum:
# TODO: For some reason, the normal `setField` rejects enum fields
# when they are used as case discriminators. File this as a bug.
if val.isSome:
if isSome(val):
`configField` = parseEnum[type(`configField`)](string(val.get))
else:
`configField` = `defaultValue`