-
Notifications
You must be signed in to change notification settings - Fork 441
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
Using combinations in a Playground #190
Comments
I got the same issue, it kept complaining about Running Xcode 14.2 (14C18) and target set to iOS 16.2 After constantly failing, it randomly worked. But I can't explain how or why my laptop froze and I had to restart and then after doing so it went back to throwing me this error and not recognizing the
gives
Any help is appreciated. |
The solution I found is in File->Packages
Choose Reset/Resolve and Update packages in various orders until it works.
…-Rob
On Dec 27, 2022, at 8:45 PM, HBR ***@***.***> wrote:
I got the same issue, it kept complaining about combinations. My playground is in a workspace that has the package swift-algorithms added to it.
Running Xcode 14.2 (14C18) and target set to iOS 16.2
After constantly failing, it randomly worked. But I can't explain how or why my laptop froze and I had to restart and then after doing so it went back to throwing me this error and not recognizing the combinations func.
import Algorithms
let numbers = [10, 20, 30, 40]
for combo in numbers.combinations(ofCount: 2) {
print(combo)
}
gives
expression failed to parse:
error: Punnett.playground:4:22: error: value of type '[Int]' has no member 'combinations'
for combo in numbers.combinations(ofCount: 2) {
~~~~~~~ ^~~~~~~~~~~~
Any help is appreciated.
Thanks.
—
Reply to this email directly, view it on GitHub <#190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AALBS7ZC3FA5YAEXV2FDX6TWPOLTVANCNFSM6AAAAAAQSHT42M>.
You are receiving this because you authored the thread.
|
@rfcohen that worked. Hopefully this gets resolved in more correct way, but until then this workaround should do the job. Thanks! |
Xcode 14, target iOS is 14.1
When using a combinations in a playground, I get this error -
error: Test.playground:301:30: error: value of type '[Double]' has no member 'combinations' for combo in combos.combinations(ofCount: 1...4) {
Now where else to turn. It seems that the package is successfully added to the project. The playground is in the project with the dependancy added.
The import statement is there.
import Algorithms
Growl, not sure who else to ask?
The text was updated successfully, but these errors were encountered: