Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Setters as parameters to annotations #4107

Open
CeylonMigrationBot opened this issue Jun 23, 2014 · 7 comments
Open

Setters as parameters to annotations #4107

CeylonMigrationBot opened this issue Jun 23, 2014 · 7 comments

Comments

@CeylonMigrationBot
Copy link

[@tombentley] According to the spec, an annotation constructor parameter type may be a subtype of Declaration in ceylon.language.meta.declaration. SetterDeclaration is such a subtype, but there's no syntax for making setter references according to section 6.11. If this is intentional, I think it's worth point out, because SetterDeclaration is the only subtype of Declaration lacking such support.

[Migrated from ceylon/ceylon-spec#1001]

@CeylonMigrationBot
Copy link
Author

[@FroMage] Why again didn't we allow assign foo?

@CeylonMigrationBot
Copy link
Author

[@gavinking] Well according to the spec a setter is not really a separate declaration.

@CeylonMigrationBot
Copy link
Author

[@FroMage] If it is not a separate declaration, why can it have annotations?

@CeylonMigrationBot
Copy link
Author

[@FroMage] I mean, I'm pretty sure it can, since our backend supports and tests this ;)

@CeylonMigrationBot
Copy link
Author

[@gavinking] Because there is no requirement that thing with annotations => declaration. Other program elements, for example assert can have annotations.

@CeylonMigrationBot
Copy link
Author

[@FroMage] Sure, but still, from an outside perspective, it declares a setter and can have properties distinct of the getter, so it really feels like a declaration.

@CeylonMigrationBot
Copy link
Author

[@gavinking] Not for 1.1, unless someone has a pressing need.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants