The May 24, 2011 Scala Language Specification has a typo in section 6.12.3 as discovered here. This was acknowledged on the mailing list.
What is the actual precedence for the infix operators?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I thought it would be fun figuring it out by testing it, I wrote the following code to be executed in the REPL. Given:
First generate an intermediate scala file that use and test the operators.
Then Load Op class, run tests and load comps
This prints:
So the main difference with the spec is
< >needs to be switched with= !.