Navigation Menu

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

Support for @override annotations (as structured doc comments) #3752

Closed
pq opened this issue Jun 19, 2012 · 8 comments
Closed

Support for @override annotations (as structured doc comments) #3752

pq opened this issue Jun 19, 2012 · 8 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug
Milestone

Comments

@pq
Copy link
Member

pq commented Jun 19, 2012

In a nutshell this entails:

  * adding support for annotations (or metadata) to DartNodes
  * associating parsed metadata with DartNodes (possibly in CommentPreservingParser)
  * detecting and reporting errors/warnings when invariants are violated

To start, we can enforce that methods marked as overriding do in fact override ; if they don't we should produce an error.

As a first cut, we will use the following simple format:

// @­override

and insist that it be on a line immediately preceding a method declaration. For example:

  // @­override
  bool isAssignable() => false;

@sethladd
Copy link
Contributor

Added Triaged label.

@sethladd
Copy link
Contributor

Please see the metadata proposal: http://news.dartlang.org/2012/06/proposal-to-add-metadata-to-dart.html

@scheglov
Copy link
Contributor

@DartBot
Copy link

DartBot commented Jun 24, 2012

This comment was originally written by @sethladd


Will this transition to metadata if that gets added to the spec?

@scheglov
Copy link
Contributor

Not sure what you mean exactly, but in any case, if something will be added to spec, DartC and Editor will follow spec.

@sethladd
Copy link
Contributor

As far as I can tell, this proposal is to read annotations from within comments.

Peter's new metadata proposal will allow for annotations outside of comments, as part of the language.

Curious if @­override will become a real metadata annotation, or if it will continue to live inside of comments.

@bwilkerson
Copy link
Member

Yes, we are aware of Peter's proposal, and yes, if metadata support is added to the language (in that or another form) then we will support it (and likely remove support for comment-based metadata). But if metadata support is not added to the language, then this (and the companion issue) will provide much needed support to our customers.

@scheglov
Copy link
Contributor

@pq pq added Type-Enhancement P1 A high priority bug; for example, a single project is unusable or has many test failures area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Jun 26, 2012
@pq pq added this to the M1 milestone Jun 26, 2012
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants