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

Error in EBNF of alphaid (or bug in processed strings) #7322

Closed
scabug opened this issue Apr 2, 2013 · 2 comments
Closed

Error in EBNF of alphaid (or bug in processed strings) #7322

scabug opened this issue Apr 2, 2013 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Apr 2, 2013

The EBNF of aphaid in SIP11 says that id preceding a processed is

alphaid ::= upper idrest
        | varid

Scala Language Specification 2.9 specifies

varid ::= lower idrest
idrest ::= {letter | digit} [‘_’ op]
op ::= opchar {opchar}

Acording to the EBNF, the following should be a list of valid alphaids.

a_a
a_+

However, when using the later with processed strings, the following compiler error is produced:

error: value a_+ is not a member of StringContext

Example code:

implicit class A(val sc: StringContext) {
  def a_a(args: Any*) = args
  def a_+(args: Any*) = args
}

val a = "Hello StringInterpolation"

a_a"$a" // ok, produces WrappedArray(Hello StringInterpolation)

a_+"$a" // error: value a_+ is not a member of StringContext

StringContext("").a_+(a) // ok, produces WrappedArray(Hello StringInterpolation)
@scabug
Copy link
Author

scabug commented Apr 2, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7322?orig=1
Reporter: Heikki Vesalainen (hvesalai)
Affected Versions: 2.10.1

@scabug
Copy link
Author

scabug commented Jan 29, 2014

@som-snytt said:
That would be a gnat.

scala/scala#3424

@scabug scabug closed this as completed Feb 1, 2014
@scabug scabug added this to the 2.11.0-RC1 milestone Apr 7, 2017
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