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

PathKit method calls #84

Open
liquidoshin opened this issue May 2, 2022 · 1 comment
Open

PathKit method calls #84

liquidoshin opened this issue May 2, 2022 · 1 comment

Comments

@liquidoshin
Copy link

This is more of a question than an issue. In your README documentation, whenever a PathKit method is called such as path.exists() it uses the () at the end as seems normal. But when I do it in the Xcode IDE, it doesn't like the () at the end. I have a check in my code:
if path.exists {
....
}
And that runs fine but with the parens:
if path.exists() {
...
}

it gives me a build error. Any idea why this is the case? It's not a big deal as I've figured how to make it work. Just curious as to whether I'm doing something wrong implementing PathKit.

@kylef
Copy link
Owner

kylef commented May 3, 2022

It appears to be a case of the readme being out of date compared to the implementation. At somepoint we made those computed properties instead of functions.

Although, in retrospect I am not sure it was a good idea, but here we are today. They are computed.

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

No branches or pull requests

2 participants