dart-sdk/tests/language/regress/regress34635_test.dart
Chloe Stefantsova d0aa049ae1 [cfe] Report cyclic dependency on declaration, not on type variable
This is a follow-up to https://dart-review.googlesource.com/c/sdk/+/339941/comment/356b962f_a73d18c8/

Change-Id: I193cee03bdfa766621d57dd4a47cc9f0da6c9c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340440
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-12-07 13:21:29 +00:00

15 lines
541 B
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.
class A<X extends C> {}
// ^
// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND
class C<X extends C> {}
// ^
// [cfe] Generic type 'C' can't be used without type arguments in the bounds of its own type variables.
// ^
// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND
main() {}