Github user pwendell commented on the pull request:
https://github.com/apache/spark/pull/1463#issuecomment-50586830
In your example, the reason why there is no annotation on the `A` class is
that it the class is distinct from the companion object. You only created the
companion object in your example. I think that in this case scala will create
an empty class. What happens if you compile this:
```
@SomeAnnotation
object A
@SomeAnnotation
class A
```
Will you see the annotation on both?
I this current approach will cause false negatives in the following
situation:
```
// This is not a developer API
class A
// This is a developer API
@DeveloperAPI
object A
```
In this case changes to the `A` class would be ignored, incorrectly.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---