dart-sdk/tests/language_2/regress_35260_test.dart
Jens Johansen ad62f21e5b Fix crash with multiple same-named redirecting constructors
Without this CL we end up putting a null-reference in the tree because
the parent is never set on the redirecting constructor we try pointing
to.

Fixes #35259, #35260.

Change-Id: I8ad520453742ff1de8dd9ca5e619f9edbff9971c
Reviewed-on: https://dart-review.googlesource.com/c/85384
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-11-30 08:53:10 +00:00

17 lines
396 B
Dart

// Copyright (c) 2018, 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.
class Supertype {
factory Supertype() = X;
factory Supertype() = X; //# 01: compile-time error
}
class X implements Supertype {
X();
}
main() {
X x = new Supertype();
}