Add a test of creating a subtype of Never

Change-Id: I9d28868667667cca5eb122e33226b21850b062bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101067
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/tests/language_2/nnbd/static_errors/subtype_of_never_test.dart b/tests/language_2/nnbd/static_errors/subtype_of_never_test.dart
new file mode 100644
index 0000000..a19197c
--- /dev/null
+++ b/tests/language_2/nnbd/static_errors/subtype_of_never_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2019, 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.
+
+// SharedOptions=--enable-experiment=non-nullable
+
+// Test that it is an error for a class to extend, implement, or mixin the type
+// Never.
+class A extends Never {} //# 01: compile-time error
+
+class A implements Never {} //# 02: compile-time error
+
+class A with Never {} //# 03: compile-time error
+
+mixin M on Never {} //# 04: compile-time error
+
+main() {}