Skip to content

Annotations should always invoke the constructor #26840

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

Closed
floitschG opened this issue Jul 8, 2016 · 1 comment
Closed

Annotations should always invoke the constructor #26840

floitschG opened this issue Jul 8, 2016 · 1 comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report

Comments

@floitschG
Copy link
Contributor

@jacob314 suggests that annotations should always invoke the constructor:
From #26322 (comment):

This is a general issue with annotations in Dart2JS and Dart. I think the most user friendly solution is to have
@AnyAnnotation
be syntactic sugar for
@AnyAnnotation()
if AnyAnnotation is a class.
This is consistent with how some other languages handle annotations, makes the code users write more terse, and avoids these entirely confusing compile errors altogether.

@floitschG floitschG added the area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). label Jul 8, 2016
@munificent
Copy link
Member

Duplicate of #13582.

@munificent munificent added the closed-duplicate Closed in favor of an existing report label Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

2 participants