Chromium Code Reviews| 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 cae9c9fde3c817b20efb09c85e6043ba581183f2..191867ab319eefed753e72a5becd346e02f99a2a 100644 |
| --- a/pkg/compiler/lib/src/elements/modelx.dart |
| +++ b/pkg/compiler/lib/src/elements/modelx.dart |
| @@ -2052,6 +2052,25 @@ abstract class FunctionElementX extends BaseFunctionElementX |
| MemberElement get memberContext => this; |
| + @override |
|
ahe
2015/10/30 13:13:14
Oh, the horror!
Johnni Winther
2015/11/02 10:45:53
Oh, the humanity!
|
| + SourceSpan get sourcePosition { |
| + SourceSpan span = super.sourcePosition; |
|
ahe
2015/10/30 13:13:14
Consider renaming to superposition and make a joke
Johnni Winther
2015/11/02 10:45:53
Acknowledged.
|
| + 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); |
| + } |
| + } |
| + return span; |
| + } |
| + |
| void reuseElement() { |
| super.reuseElement(); |
| nestedClosures.clear(); |