eclipse-archived / ceylon

The Ceylon compiler, language module, and command line tools
http://ceylon-lang.org
Apache License 2.0
399 stars 62 forks source link

Setters as parameters to annotations #4107

Open CeylonMigrationBot opened 10 years ago

CeylonMigrationBot commented 10 years ago

[@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 commented 10 years ago

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

CeylonMigrationBot commented 10 years ago

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

CeylonMigrationBot commented 10 years ago

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

CeylonMigrationBot commented 10 years ago

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

CeylonMigrationBot commented 10 years ago

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

CeylonMigrationBot commented 10 years ago

[@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 commented 10 years ago

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