Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
index b5c15b1689d10cc2272984a28c0ab08244401649..a03bce05389964355fae1c2106110d13dd46a564 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
@@ -446,6 +446,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
pop(); // Modifiers. |
List annotations = pop(); |
if (annotations != null) { |
+ _typeInferrer.inferMetadata(annotations); |
ahe
2017/06/28 07:39:49
Can you move all these calls to endMetadataStar? A
Paul Berry
2017/06/28 12:15:59
I could do that now, but it would not work in the
|
Field field = fields.first.target; |
// The first (and often only field) will not get a clone. |
annotations.forEach(field.addAnnotation); |
@@ -589,6 +590,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
KernelFunctionBuilder builder = member; |
builder.body = body; |
Member target = builder.target; |
+ _typeInferrer.inferMetadata(annotations); |
for (Expression annotation in annotations ?? const []) { |
target.addAnnotation(annotation); |
} |
@@ -615,6 +617,13 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
} |
} |
+ @override |
+ List<Expression> finishMetadata() { |
+ List<Expression> expressions = pop(); |
+ _typeInferrer.inferMetadata(expressions); |
+ return expressions; |
+ } |
+ |
void finishConstructor( |
KernelConstructorBuilder builder, AsyncMarker asyncModifier) { |
/// Quotes below are from [Dart Programming Language Specification, 4th |