dart-sdk/tests/language/interface/duplicate_interface_implements_test.dart
Dmitry Stefantsov 025bcc486d [cfe] Use the supertype locations when reporting errors
Closes #45626.

Bug: https://github.com/dart-lang/sdk/issues/45626
Change-Id: I672efb0bba516534151630e6627959e0971840e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195515
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-04-16 15:49:12 +00:00

19 lines
598 B
Dart

// Copyright (c) 2013, 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.
import "duplicate_interface_lib.dart" as alib;
import "duplicate_interface_lib.dart" show InterfA;
// Expect error since InterfA and alib.InterfA refer to the same interface.
class Foo implements InterfA
, alib.InterfA
//^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_REPEATED
// [cfe] 'InterfA' can only be implemented once.
{}
main() {
new Foo();
}