Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: compiler/java/com/google/dart/compiler/parser/DartParser.java

Issue 11316088: Issue 6771. Show @deprecated warning for fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index 7537e4389a49532d5461013bbb9b433157e9e27b..bd05c25af6651aa8b0994b5e36e7c5902efd758c 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -385,6 +385,14 @@ public class DartParser extends CompletionHooksParserBase {
* @param metadata the metadata to be associated with the node
*/
private void setMetadata(DartNodeWithMetadata node, List<DartAnnotation> annotations) {
+ if (node instanceof DartFieldDefinition) {
+ DartFieldDefinition fieldDefinition = (DartFieldDefinition) node;
+ List<DartField> fields = fieldDefinition.getFields();
+ for (DartField field : fields) {
+ setMetadata(field, annotations);
+ }
+ return;
+ }
if (annotations != null && !annotations.isEmpty()) {
node.setMetadata(annotations);
if (node instanceof DartDeclaration<?>) {
@@ -3750,9 +3758,8 @@ public class DartParser extends CompletionHooksParserBase {
constructor = doneWithoutConsuming(toPrefixedType(parts));
} else {
// Named constructor.
- DartIdentifier identifier = (DartIdentifier)part2.getIdentifier();
- constructor = doneWithoutConsuming(new DartPropertyAccess(doneWithoutConsuming(part1),
- identifier));
+ DartIdentifier identifier = (DartIdentifier) part2.getIdentifier();
+ constructor = doneWithoutConsuming(new DartPropertyAccess(part1, identifier));
}
break;
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698