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

Compilation failure on empty lines after annotation #10065

Closed
scabug opened this issue Nov 16, 2016 · 2 comments
Closed

Compilation failure on empty lines after annotation #10065

scabug opened this issue Nov 16, 2016 · 2 comments

Comments

@scabug
Copy link

scabug commented Nov 16, 2016

Compiler fails to handle annotated methods if annotation is separated from method definition by new empty line:

package some.pck

import javax.ws.rs.Path

trait DescriptionHandler {

  @Path("/descriptions")

  def getDescriptionsRoute: String
}
Error:(9, 1) expected start of definition
  def getDescriptionsRoute: String
@scabug
Copy link
Author

scabug commented Nov 16, 2016

Imported From: https://issues.scala-lang.org/browse/SI-10065?orig=1
Reporter: Nik Michaels (nukie)
Affected Versions: 2.11.5

@scabug
Copy link
Author

scabug commented Nov 16, 2016

@lrytz said:
this is as specified

  TemplateStat      ::=  Import
                      |  {Annotation [nl]} {Modifier} Def
                      |  {Annotation [nl]} {Modifier} Dcl

http://www.scala-lang.org/files/archive/spec/2.11/13-syntax-summary.html

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

1 participant