Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow nil arguments for function #84

Merged

Conversation

vicpatel
Copy link
Contributor

@vicpatel vicpatel commented Jul 29, 2022

It allows nil as an argument for function, so this chance will use reflect value for the interface when argument is resolved as nil instead of throwing an error.

This is necessary for some scenarios where nil is expected as an argument but createCallArguments throws an error for the nil argument hence the underlying referenced function is resulting in an error. eg. IsNil(i interface {}) bool.

This will solve this problem but of course, Is there any workaround for this?

Please take a look.

@vicpatel vicpatel force-pushed the fix-allowing-nil-as-argument branch from e9af766 to 07ad5c3 Compare August 31, 2022 09:15
It uses reflect value for interface when argument is resolved as nil.
@vicpatel vicpatel force-pushed the fix-allowing-nil-as-argument branch from 07ad5c3 to 30e2ce1 Compare August 31, 2022 10:30
@generikvault generikvault merged commit ecdb989 into PaesslerAG:master Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants