Swift contains() doesn't accept tuple as arg 'x'
| Originator: | gilesvg | ||
| Number: | rdar://19076086 | Date Originated: | 11/24/14 |
| Status: | Open | Resolved: | |
| Product: | Xcode | Product Version: | 6A1052d |
| Classification: | Reproducible: |
Summary:
Passing an array of tuples (as arg 'seq') and a tuple (as arg 'x') into Swift's contains() function throws a compiler error ("Cannot invoke 'contains' with an argument list of type …")
Steps to Reproduce:
1. Assign an array of tuples to a variable. E.g. `let tuples = [(1, 2), (3, 4)]`
2. Call contains() with array and sample tuple. E.g. `contains(tuples, (1, 2))`
Expected Results:
contains() in step 2 should return true
Actual Results:
contains() in step 2 throws a compiler error: "Cannot invoke 'contains' with an argument list of type '(@lvalue [((Int, Int))], ($T5, Int))'"
Version:
6A1052d
Notes:
Configuration:
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!