Skip to content
Discussion options

You must be logged in to vote

Hi,
It looks like a standard Swift error message. It seems that $0.canLogin misses its enclosing curly braces:{ $0.canLogin }. It also seems that you're using the deprecated version of this initializer that you should preferably use.

Alternatively, you could probably use \.canLogin instead { $0.canLogin }, because the KeyPath<State, Bool> is automatically promoted as a function (State) -> Bool equivalent to { $0.canLogin }. That's maybe where things were mixed up.

Also, LocalizedStringKey is ExpressibleByStringLiteral, so you should directly use "Hy".

By the way, you can preserve your code formatting by using a triple "`" instead of a single one, and add "swift" to get code highlighting:

`…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Yudi26
Comment options

@Yudi26
Comment options

@tgrapperon
Comment options

@Yudi26
Comment options

Answer selected by Yudi26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants