56f46b0659
This changes the CFE expectation test suites to use unsound null safety as default to avoid passing --enable-experiments=no-non-nullable to opt out old test folders. This change removes most test folders from the 'strong' tester, since this now only supports sound null safety, which requires all libraries to be opted in. Instead, the 'weak' tester now runs all test folders. Additionally the 'outline' tester is changed to use unsound null safety so that it call be used on all test folders. The 'fast_strong' tester is removed since it should just be run locally and it can be run by passing an option to the other testers. References to non-existing 'shaker' folder has been removed from testing.json. Change-Id: Ibcc306f7b27d06b9637c205238bc408194f1d062 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184787 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jens Johansen <jensj@google.com>
99 lines
2.1 KiB
Dart
99 lines
2.1 KiB
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.
|
|
// @dart=2.9
|
|
class Interface1 {
|
|
void interfaceMethod1() {}
|
|
}
|
|
|
|
class Interface2 {
|
|
void interfaceMethod2() {}
|
|
|
|
var interfaceMethod1;
|
|
}
|
|
|
|
class Interface3 {
|
|
void interfaceMethod3() {}
|
|
}
|
|
|
|
abstract class A implements Interface1, Interface2, Interface3 {
|
|
aMethod() {}
|
|
abstractMethod();
|
|
void set property1(_);
|
|
void set property2(_);
|
|
void set property3(_);
|
|
}
|
|
|
|
abstract class B extends A {
|
|
final property1 = null;
|
|
aMethod() {}
|
|
bMethod() {}
|
|
}
|
|
|
|
class MyClass extends B {
|
|
var property2;
|
|
aaMethod() {}
|
|
aMethod() {}
|
|
bMethod() {}
|
|
cMethod() {}
|
|
}
|
|
|
|
// This class should have no errors, as it has a non-trivial noSuchMethod.
|
|
class MyMock1 extends B {
|
|
noSuchMethod(_) => null;
|
|
}
|
|
|
|
// This class should have no errors, as the abstract method doesn't override
|
|
// the non-trivial noSuchMethod inherited from MyMock1.
|
|
class MyMock2 extends MyMock1 {
|
|
noSuchMethod(_);
|
|
}
|
|
|
|
// This class should have an error, the abstract method isn't considered
|
|
// non-trivial.
|
|
class MyMock3 extends B {
|
|
noSuchMethod(_);
|
|
}
|
|
|
|
class C {
|
|
void interfaceMethod1(_) {}
|
|
}
|
|
|
|
// This class should have an error, the method C.interfaceMethod1 conflicts
|
|
// with the field Interface2.interfaceMethod1.
|
|
abstract class D extends C implements Interface2 {}
|
|
|
|
class E {
|
|
void set interfaceMethod1(_) {}
|
|
}
|
|
|
|
// This class should have an error, the setter E.interfaceMethod1 conflicts
|
|
// with the method Interface1.interfaceMethod1.
|
|
abstract class F extends E implements Interface1 {}
|
|
|
|
class Foo {
|
|
void foo() {}
|
|
}
|
|
|
|
class G {
|
|
Object get foo => null;
|
|
}
|
|
|
|
// This class should have an error, the getter G.foo conflicts with the method
|
|
// Foo.foo.
|
|
abstract class H extends G implements Foo {}
|
|
|
|
class Bar {
|
|
Object get foo => null;
|
|
}
|
|
|
|
class I {
|
|
Object foo() {}
|
|
}
|
|
|
|
// This class should have an error, the getter Bar.foo conflicts with the
|
|
// method I.foo.
|
|
abstract class J extends I implements Bar {}
|
|
|
|
main() {}
|