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

Use of numbers in backquoted identifiers results in unintelligible repl errors #8456

Open
scabug opened this issue Mar 28, 2014 · 4 comments

Comments

@scabug
Copy link

scabug commented Mar 28, 2014

scala> val `1 + 1` = 1 + 1
<console>:5: error: Invalid literal number
  lazy val $result = 1$u0020$plus$u00201
                                                                         ^
<console>:10: error: Invalid literal number
 + "1 + 1: Int = " + scala.runtime.ScalaRunTime.replStringOf(1$u0020$plus$u00201, 1000)
                                                                                                                 ^
<console>:13: error: ')' expected but '}' found.
  }
  ^
@scabug
Copy link
Author

scabug commented Mar 28, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8456?orig=1
Reporter: @densh
Affected Versions: 2.11.0-RC4

@scabug
Copy link
Author

scabug commented Mar 28, 2014

@densh said:
This issues seems to be localized to the REPL. It works just fine if you put into a regular file and compile it.

@scabug
Copy link
Author

scabug commented Apr 19, 2015

Li Haoyi (lihaoyi) said:
This has been fixed in the Ammonite REPL.

@  val `1 + 1` = 1 + 1
`1 + 1`: Int = 2
@ `1 + 1`
res31: Int = 2
@

@SethTisue
Copy link
Member

still reproducible in 2.13.2

@SethTisue SethTisue added this to the Backlog milestone Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants