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?
It allows
nil
as an argument for function, so this chance will use reflect value for the interface when argument is resolved asnil
instead of throwing an error.This is necessary for some scenarios where
nil
is expected as an argument butcreateCallArguments
throws an error for thenil
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.