We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
scala> class ann extends scala.annotation.StaticAnnotation defined class ann scala> trait T { @ann type X } defined trait T scala> type T = { @ann type X } <console>:1: error: illegal start of declaration type T = { @ann type X } ^ scala> class T { @ann def x: Int = ??? } defined class T scala> type T = { @ann def x: Int } <console>:1: error: illegal start of declaration type T = { @ann def x: Int } ^
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-8056?orig=1 Reporter: @xeno-by Affected Versions: 2.10.3, 2.11.0-M7
Sorry, something went wrong.
@xeno-by said: Discussion: https://groups.google.com/forum/#!topic/scala-internals/5n07TiCnBZU
Scala 3 accepts trait T { @ann type X } but does not accept type T = { @ann def x: Int }
trait T { @ann type X }
type T = { @ann def x: Int }
No branches or pull requests
The text was updated successfully, but these errors were encountered: