Files
sdk/pkg/front_end/testcases/nnbd/bounds_checks.dart
T
Johnni Winther 62f84880ef [cfe] Report error on missing return from non-nullable function
Closes #40520
Closes #40948
Closes #40425

Change-Id: I0aa3cfa51b410c90dd0bea963846eeb6b2e73efb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140540
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-03-24 08:21:36 +00:00

29 lines
555 B
Dart

// 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.
class A<X extends num> {}
foo(A<num?> a) {} // Error
A<num?>? bar() {} // Error
baz<T extends A<num?>>() {} // Error
class B extends A<num?> {} // Error
class C<T extends A<num?>> {} // Error
void hest<T extends num>() {}
class Hest {
void hest<T extends num>() {}
}
fisk(Hest h) {
hest<num?>();
h.hest<num?>();
}
main() {}