add note about bug

This commit is contained in:
Daylin Morgan 2025-01-25 17:17:11 -06:00
parent a88765e328
commit 2915f65d15
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -800,6 +800,12 @@ func flagToTuple(c: CliCfg, f: CliFlag | BuiltinFlag): NimNode =
newLit"" newLit""
else: else:
f.defaultVal or newLit"" f.defaultVal or newLit""
# BUG: if f.defaultVal is @[] `$` fails
# but works with `newSeq[T]()`
# could replace "defaultVal" with newSeq[T]()
# under the hood when parsing type/val
quote do: quote do:
(`short`, `long`, `help`, bbEscape($`defaultVal`)) (`short`, `long`, `help`, bbEscape($`defaultVal`))