b1a54154f8
This required adding an implementation of super-bounded types to the analyzer. We really could use some more tests to verify that we disallow super-bounded types in all the appropriate locations, but allow it in other cases (it seems that there are no language_2 tests to verify this). To avoid churn, I'll wait until I have confirmation that my reasoning is correct in #34583 before submitting test cases. Fixes #34532. Fixes #34560. Change-Id: I3c5def60bcac0d31b56bead31cb1aab445f18e96 Reviewed-on: https://dart-review.googlesource.com/76280 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
13 lines
397 B
Dart
13 lines
397 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 Foo<T> {}
|
|
|
|
class Bar<T extends Foo<T>> {}
|
|
|
|
// Should be error here, because Bar completes to Bar<Foo>
|
|
class Baz extends /*@compile-error=unspecified*/ Bar {}
|
|
|
|
void main() {}
|