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
Cannot escape operators #8918
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8918?orig=1 |
@som-snytt said: |
Guillaume Massé (masgui) said:
|
@som-snytt said: But also, an id is an id. Backquotes don't change anything here. Reduced: scala> val - = 2
-: Int = 2
scala> $minus
res0: Int = 2
scala> - // newline or semi should disambiguate unary op
| 1
<console>:2: error: illegal start of simple expression
1
^
scala> -( // contrast
| 1
| )
res3: Int = -1
|
@som-snytt said (edited on Oct 25, 2015 7:42:45 AM UTC): where they must be followed by a simple expr to be taken as unary ops. |
I saw someone reporting this on irc
val
-
= 2-
1+1 // << illegal start of simple expression
val
+
= 2$plus // << ok
1+1
The text was updated successfully, but these errors were encountered: