explicitly initialize `result` (#89)
In Nim 2.0, `'result' requires explicit initialization`. Fix `makeDefaultValue` to do so.
This commit is contained in:
parent
d784b823be
commit
674c9e4c8e
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue