mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:11:19 +00:00
ad62f21e5b
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>
17 lines
396 B
Dart
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();
|
|
}
|