9abc9fc4d7
A line marked with "// error" should get an error (or it's an error), and one marked with "// ok" should not get an error (and if it does it's an error). Some tests are left unhandled and are programatically ignored in this first CL. A bug (https://github.com/dart-lang/sdk/issues/54635) has been filed to sort those out. Change-Id: I083f62829ceff6ff85121e21cfdb6670bfacb7e6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346301 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
44 lines
673 B
Dart
44 lines
673 B
Dart
// Copyright (c) 2023, 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.
|
|
|
|
abstract class A {}
|
|
|
|
class B {
|
|
final A a;
|
|
|
|
external B(A a); // Ok
|
|
}
|
|
|
|
class C {
|
|
final A a1;
|
|
final A a2;
|
|
|
|
external C(); // Ok
|
|
C.named(this.a1, this.a2); // Ok
|
|
}
|
|
|
|
class D {
|
|
final A a1;
|
|
final A a2;
|
|
|
|
external D(); // Ok
|
|
D.named(this.a1); // Error
|
|
}
|
|
|
|
class E {
|
|
final A a1;
|
|
final A a2;
|
|
|
|
E(this.a2); // Error
|
|
external E.named(); // Ok
|
|
}
|
|
|
|
class F {
|
|
final A a1;
|
|
final A a2;
|
|
|
|
F(this.a1, this.a2); // Ok
|
|
external F.named(); // Ok
|
|
}
|