Index: test/rules/must_call_super.dart |
diff --git a/test/rules/must_call_super.dart b/test/rules/must_call_super.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..637c6f5725da5718306e2f9a04b056a1a121da05 |
--- /dev/null |
+++ b/test/rules/must_call_super.dart |
@@ -0,0 +1,31 @@ |
+// 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 w/ `dart test/util/solo_test.dart must_call_super` |
+ |
+import 'package:meta/meta.dart'; |
+ |
+class A { |
+ @mustCallSuper |
+ void a() {} |
+} |
+ |
+class B extends A { |
+ @override |
+ void a() //LINT |
+ {} |
+} |
+ |
+class C extends A { |
+ @override |
+ void a() { |
+ super.a(); //OK |
+ } |
+} |
+ |
+class D extends C { |
+ @override |
+ void a() //LINT |
+ {} |
+} |