dart-sdk/tests/language_2/nsm5_test.dart
Paul Berry 314b89e11d Update the analyzer to require noSuchMethod overrides to be concrete.
See 38dcb10543 for details.

Change-Id: I00608f7106e1b37cde81b8145d8d748f8cd97804
Reviewed-on: https://dart-review.googlesource.com/36520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-01-24 13:55:18 +00:00

20 lines
553 B
Dart

// Copyright (c) 2016, 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.
// Test for compile-time errors for member access on classes that inherit a
// user defined noSuchMethod, even if it is abstract.
import 'package:expect/expect.dart';
abstract class Mock {
noSuchMethod(i);
}
abstract class Foo {
int foo();
}
/*@compile-error=unspecified*/ class WarnMe extends Mock implements Foo {}
main() {}