diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart index 6750f6de210..4f4ee426912 100644 --- a/lib/compiler/implementation/ssa/builder.dart +++ b/lib/compiler/implementation/ssa/builder.dart @@ -1113,7 +1113,9 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { element: constructor); } + sourceElementStack.add(constructor.enclosingElement); buildFieldInitializers(constructor.enclosingElement, fieldValues); + sourceElementStack.removeLast(); int index = 0; FunctionSignature params = constructor.computeSignature(compiler); @@ -2297,8 +2299,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { typeInfo = pop(); } if (type.element.isTypeVariable()) { - // TODO(karlklose): We currently answer true to any is check - // involving a type variable -- both is T and is !T -- until + // TODO(karlklose): We currently answer true to any is check + // involving a type variable -- both is T and is !T -- until // we have a proper implementation of reified generics. stack.add(graph.addConstantBool(true, constantSystem)); } else { diff --git a/tests/compiler/dart2js_extra/source_mapping_crash_source.dart b/tests/compiler/dart2js_extra/source_mapping_crash_source.dart new file mode 100644 index 00000000000..825360f25db --- /dev/null +++ b/tests/compiler/dart2js_extra/source_mapping_crash_source.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/******************************************************************************* + * Long comment to make positions in this file exceed those in + * 'source_mapping_crash_test.dart'. + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + ******************************************************************************* + */ +class Super { + final sb = new StringBuffer(); + Super(var y); +} diff --git a/tests/compiler/dart2js_extra/source_mapping_crash_test.dart b/tests/compiler/dart2js_extra/source_mapping_crash_test.dart new file mode 100644 index 00000000000..b5cc2e0f63d --- /dev/null +++ b/tests/compiler/dart2js_extra/source_mapping_crash_test.dart @@ -0,0 +1,15 @@ +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#source('source_mapping_crash_source.dart'); + +class Sub extends Super { + Sub(var x) : super(x.y); +} + +class X { var y; } + +main() { + new Sub(new X()); +}