explicitly initialize result (#89)

In Nim 2.0, `'result' requires explicit initialization`.

Fix `makeDefaultValue` to do so.
This commit is contained in:
Etan Kissling 2023-08-20 12:40:32 +02:00 committed by GitHub
parent d784b823be
commit 674c9e4c8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -629,7 +629,7 @@ template setField[T](loc: var seq[T], val: Option[string], defaultVal: untyped)
loc = FieldType(defaultVal)
func makeDefaultValue*(T: type): T =
discard
default(T)
func requiresInput*(T: type): bool =
not ((T is seq) or (T is Option) or (T is bool))