| Index: pkg/compiler/lib/src/ssa/builder.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
|
| index 9e17d7a9a503202de4c087bd2b3aba3d73dcb598..ca2e07ed6802febc100dee7565611eafe8ea00f0 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder.dart
|
| @@ -747,9 +747,20 @@ class SsaBuilder extends ast.Visitor
|
| visit(initializer);
|
| HInstruction value = pop();
|
| value = potentiallyCheckOrTrustType(value, variable.type);
|
| - ast.SendSet sendSet = node.definitions.nodes.head;
|
| - closeAndGotoExit(new HReturn(value,
|
| - sourceInformationBuilder.buildReturn(sendSet.assignmentOperator)));
|
| + // In the case of multiple declarations (and some definitions) on the same
|
| + // line, the source pointer needs to point to the right initialized
|
| + // variable. So find the specific initialized variable we are referring to.
|
| + ast.Node sourceInfoNode = initializer;
|
| + for (var definition in node.definitions) {
|
| + if (definition is ast.SendSet &&
|
| + definition.selector.asIdentifier().source == variable.name) {
|
| + sourceInfoNode = definition.assignmentOperator;
|
| + break;
|
| + }
|
| + }
|
| +
|
| + closeAndGotoExit(new HReturn(value, sourceInformationBuilder.buildReturn(
|
| + sourceInfoNode)));
|
| return closeFunction();
|
| }
|
|
|
|
|