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

REPL does not compile for ident name `1` #9467

Closed
scabug opened this Issue Sep 11, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@scabug
Copy link

scabug commented Sep 11, 2015

Welcome to Scala version 2.11.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).
Type in expressions to have them evaluated.
Type :help for more information.

scala> val `1` = "foo"
<console>:5: error: ';' expected but double literal found.
  lazy val $result = 1
                                         ^
<console>:10: error: ')' expected but double literal found.
 + "1: String = " + scala.runtime.ScalaRunTime.replStringOf(1, 1000)
                                                                                ^
<console>:13: error: ')' expected but '}' found.
  }
  ^
@scabug

This comment has been minimized.

Copy link

scabug commented Sep 11, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9467?orig=1
Reporter: @Atry
Affected Versions: 2.11.7
Duplicates #8456

@scabug

This comment has been minimized.

Copy link

scabug commented Sep 11, 2015

@som-snytt said:
Since I just looked up the issues, I'll also paste the joke:

Backticks are the worst bugs because they carry Lyme disease.

#6919

#7957

Actually, the duplicate is #8456

The double literal is due to the selection $iw.1.

Here is a related, possibly unexpected result:

$ scala
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM 1.8.0_60)
Type in expressions for evaluation. Or try :help.

scala> .1
<console>:1: error: ';' expected but double literal found.
$intp.1
     ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment