mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 09:43:08 +00:00
45efccb5e0
This CL replaces https://dart-review.googlesource.com/c/sdk/+/296900 The `List` constructor is removed in Dart 3.0. Some of the `@patch` implementations were not removed. This is *high priority*. It seems the left-over `@patch factory List` constructor did not cause any errors, instead it *added* a constructor to `List` that can be used in web compiled code. Even if `List` doesn't have such a constructor in the SDK code proper. The VM and analyzer will say the invocation is an error, but dart2js happily compiles it and runs. (It used to be that patches couldn't add public members, that security seems to have been removed.) Also removes code which tries to detect "the unnamed List constructor", which is no longer a thing, and a number of invocations of the constructor, where it's not clear that the test is aware that the constructor no longer exists, and is not marked as `@dart=2.x` with x < 12. TEST=ci Change-Id: I4ffaf3ae2c4e75ca06e7ba0bf19187b6376f3888 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297100 Reviewed-by: Brian Quinlan <bquinlan@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Stephen Adams <sra@google.com>
18 lines
505 B
Dart
18 lines
505 B
Dart
// Copyright (c) 2011, 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.
|
|
// Check fail because of cycles in super class relationship.
|
|
|
|
class C extends B {}
|
|
|
|
class A extends B {}
|
|
|
|
class B
|
|
extends A // //# 01: compile-time error
|
|
extends A // //# 02: compile-time error
|
|
{}
|
|
|
|
main() {
|
|
new C(); // //# 01: continued
|
|
new List<C>.empty(); // //# 02: continued
|
|
}
|