Fix invalid location in inline super constructor.

R=ahe@google.com
BUG=5184

Review URL: https://codereview.chromium.org//10991035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12903 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
podivilov@google.com
2012-09-26 12:18:19 +00:00
parent d5a4792d09
commit a7f87440be
3 changed files with 73 additions and 2 deletions
+4 -2
View File
@@ -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 {
@@ -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);
}
@@ -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());
}