Describe the bug
Using the default value of getkeyval() for the third parameter (as described by the documentation, it is sDef="") does not work but throws an empty expression error. If the default value is used explicitly, the error goes away.
To Reproduce
Steps to reproduce the behavior:
Create a key-value cluster kvlist{}
Try to read a value of an non-existing key using getkeyval(kvlist{}, "non-existing-key")
See error (disappears, if used like getkeyval(kvlist{}, "non-existing-key", "")
Expected behavior
The behavior of getkeyval(kvlist{}, "non-existing-key") and getkeyval(kvlist{}, "non-existing-key", "") should be identical.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: 10x64
Version v1.1.5.2303
Additional context
Add any other context about the problem here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
The problem is rooted in the fact that the StringArg class does not default to an empty string (which might be intentional). Figure out, why is that and how to resolve the missing default value the optimal way.
DESCRIPTION
Describe the bug Using the default value of
getkeyval()
for the third parameter (as described by the documentation, it issDef=""
) does not work but throws an empty expression error. If the default value is used explicitly, the error goes away.To Reproduce Steps to reproduce the behavior:
kvlist{}
getkeyval(kvlist{}, "non-existing-key")
getkeyval(kvlist{}, "non-existing-key", "")
Expected behavior The behavior of
getkeyval(kvlist{}, "non-existing-key")
andgetkeyval(kvlist{}, "non-existing-key", "")
should be identical.Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
The problem is rooted in the fact that the
StringArg
class does not default to an empty string (which might be intentional). Figure out, why is that and how to resolve the missing default value the optimal way.IMPLEMENTATION STEPS
(see also our Wiki for implementation guidelines)
DOCUMENTATION STEPS
(see also our Wiki for further information)
*.NHLP
and*.NDB
files, if needed)*.NLNG
files, if needed)PULL REQUEST