Index: pkg/compiler/lib/src/elements/modelx.dart |
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart |
index 2e462f4dca7f97f96ff7cc910b4bf3576e9b4060..10c2f71197648518ef2e5fd429b0b53275c055c0 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -3268,7 +3268,15 @@ abstract class AstElementMixin implements AstElement { |
} |
ResolvedAst get resolvedAst { |
+ Node node = definingElement.node; |
+ Node body; |
+ if (definingElement.isField) { |
+ FieldElement field = definingElement; |
+ body = field.initializer; |
+ } else if (node != null && node.asFunctionExpression() != null) { |
+ body = node.asFunctionExpression().body; |
+ } |
return new ParsedResolvedAst( |
- declaration, definingElement.node, definingElement.treeElements); |
+ declaration, node, body, definingElement.treeElements); |
} |
} |