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 3f0d70ccab257c5f6f3694efbdd73a1346b78409..121a88214fe2fb52ce9177beeffbb362505724de 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -2115,14 +2115,7 @@ abstract class FunctionElementX extends BaseFunctionElementX |
if (span != null && hasNode) { |
FunctionExpression functionExpression = node.asFunctionExpression(); |
if (functionExpression != null) { |
- Token begin = functionExpression.getBeginToken(); |
- Token end; |
- if (functionExpression.parameters != null) { |
- end = functionExpression.parameters.getEndToken(); |
- } else { |
- end = functionExpression.name.getEndToken(); |
- } |
- span = new SourceSpan.fromTokens(span.uri, begin, end); |
+ span = new SourceSpan.fromNode(span.uri, functionExpression); |
} |
} |
return span; |