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

Setters as parameters to annotations #1001

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

Setters as parameters to annotations #1001

tombentley opened this issue Jun 23, 2014 · 7 comments
Milestone

Comments

@tombentley
Copy link
Member

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.

@tombentley tombentley added this to the 1.1 milestone Jun 23, 2014
@FroMage
Copy link
Member

FroMage commented Jun 23, 2014

Why again didn't we allow assign foo?

@gavinking
Copy link
Member

Well according to the spec a setter is not really a separate declaration.

@FroMage
Copy link
Member

FroMage commented Jun 23, 2014

If it is not a separate declaration, why can it have annotations?

@FroMage
Copy link
Member

FroMage commented Jun 23, 2014

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

@gavinking
Copy link
Member

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

@FroMage
Copy link
Member

FroMage commented Jun 23, 2014

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
Copy link
Member

Not for 1.1, unless someone has a pressing need.

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

3 participants