dart-sdk/tests/language_2/conflicting_generic_interfaces_hierarchy_loop_test.dart
Paul Berry 2993476129 Report an error if a class inconsistently implements a generic interface.
This is not allowed in Dart 2.0.

Change-Id: I6861ce298e5d5a5cf3f26a010990868b5ba9bda2
Reviewed-on: https://dart-review.googlesource.com/39601
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-05 12:13:12 +00:00

17 lines
604 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.
// Dart test program to test arithmetic operations.
// There is no interface conflict here, but there is a loop in the class
// hierarchy leading to a finite set of implemented types; this loop
// shouldn't cause non-termination.
/*@compile-error=unspecified*/ class A<T> implements B<T> {}
/*@compile-error=unspecified*/ class B<T> implements A<T> {}
main() {
new A();
new B();
}