blob: cfcf46e2ae90819a79aa91f5ae9436a06ac9c22f [file] [log] [blame]
// Copyright (c) 2020, 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.
// Requirements=nnbd-weak
import 'package:expect/expect.dart';
import 'function_type_bounds_null_safe_lib.dart';
main() {
// void fn<T extends Object>() is void Function<T extends Object?>()
// Should pass with weak checking because when the nullability information on
// Object and Object? are erased the type bounds are equivalent.
Expect.isTrue(fnWithNonNullObjectBound is fnTypeWithNullableObjectBound);
// void fn<T extends Null>() is void Function<T extends Never>()
// Should pass with weak checking because because Null becomes equivalent to
// the bottom type.
Expect.isTrue(fnWithNullBound is fnTypeWithNeverBound);
}