Array removeAll() is conflicting with Swift implementation
carlbrusell opened this issue · 4 comments
carlbrusell commented
When I call removeAll() of an array I get "Ambiguous use of 'removeAll' because it has implementation on the Swift.Array and EZSwiftExtensions.Array.
Example code is attached to the issue.
RemoveAllTest.zip
Khalian commented
So this happens because removeAll in the EZSwift land takes variadic parameters. This causes conflict in the special case in which the num args = 0.
I added the condition that at least one arg needs to be passed to removeAll and test cases for the same. #436
Thanks @icefall for catching this issue. Feel free to comment on the PR.
Khalian commented
@lfarah @goktugyil Can you guys look at this, this is a bug so its high priority.
Khalian commented
Merged the change. Resolving now.
Esqarrouth commented
A quick fix I did was do:
array = []