Open CeylonMigrationBot opened 10 years ago
[@FroMage] Why again didn't we allow assign foo
?
[@gavinking] Well according to the spec a setter is not really a separate declaration.
[@FroMage] If it is not a separate declaration, why can it have annotations?
[@FroMage] I mean, I'm pretty sure it can, since our backend supports and tests this ;)
[@gavinking] Because there is no requirement that thing with annotations => declaration. Other program elements, for example assert
can have annotations.
[@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.
[@gavinking] Not for 1.1, unless someone has a pressing need.
[@tombentley] According to the spec, an annotation constructor parameter type may be a subtype of
Declaration
inceylon.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, becauseSetterDeclaration
is the only subtype ofDeclaration
lacking such support.[Migrated from ceylon/ceylon-spec#1001]