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

Can't assign result of pipe operator #54

Closed
CosynPa opened this issue Sep 2, 2016 · 2 comments
Closed

Can't assign result of pipe operator #54

CosynPa opened this issue Sep 2, 2016 · 2 comments

Comments

@CosynPa
Copy link
Contributor

CosynPa commented Sep 2, 2016

func f(x: Int) -> Int {
    return 0
}

var x = 0
x = 5 |> f // error

Since the precedence group has no order relationship with AssignmentPrecedence:

precedencegroup LeftAssociativeCombinatorPrecedence {
    associativity: left
    lowerThan: DefaultPrecedence
}

Is this intended behaviour? Before Swift 3, we had precedence 95 which is lower than ternary operator (100) and higher than assignment (90).

@CodaFi
Copy link
Member

CodaFi commented Sep 2, 2016

All of the precedencegroups we have are subject to revision right now, so thank you for reporting this. Would you mind opening a pull request against typelift/Operadics for this? If you can't find the time to do so, I will get to this tonight.

@CodaFi CodaFi mentioned this issue Sep 3, 2016
@CodaFi
Copy link
Member

CodaFi commented Sep 3, 2016

Thank you again for reporting this, it has been resolved by the merge of #55.

@CodaFi CodaFi closed this as completed Sep 3, 2016
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