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

Meta annotation targeting primary constructor #5647

Open
scabug opened this issue Apr 6, 2012 · 3 comments
Open

Meta annotation targeting primary constructor #5647

scabug opened this issue Apr 6, 2012 · 3 comments

Comments

@scabug
Copy link

scabug commented Apr 6, 2012

Annotating a primary constructor is pretty ugly. For example:

@Component
class Foo @Autowired()(val bar: Bar) {
  //...
}

It would be nice if you could target what would normally be a class annotation at the primary constructor - for example:

object Annotations {
  type AutowiredConstructor = Autowired @primaryConstructor
}

@Component
@AutowiredConstructor
class Foo(val bar: Bar) {
  //...
}
@scabug
Copy link
Author

scabug commented Apr 6, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5647?orig=1
Reporter: Eric Pederson (ericacm)
See #4242

@scabug
Copy link
Author

scabug commented May 12, 2012

@soc said:
Action on one ticket will probably have effect on the other one: #4242 / #5647.

@scabug
Copy link
Author

scabug commented Sep 17, 2014

@retronym said:
Recently requested by the Play team for the same reason.

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