Files
sdk/tests/language/null/inherit_static_errors_test.dart
T
Nicholas Shahan 5f8b3e8283 [tests] Migrate multi-test to static error test
Remove compile time errors from null_test.dart and move them into
a new static error test file.

Add the other mixin application syntax.

This makes it so much easier to run and debug null_test.dart on a
backend.

Change-Id: I126a580ccf477962cd90dccff267034bd9b35a2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254722
Commit-Queue: Erik Ernst <eernst@google.com>
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2022-08-12 07:57:48 +00:00

37 lines
1.5 KiB
Dart

// Copyright (c) 2022, 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.
class BadExtends extends Null {}
// ^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
// ^
// [cfe] 'Null' is restricted and can't be extended or implemented.
// [cfe] The superclass, 'Null', has no unnamed constructor that takes no arguments.
// ^
// [cfe] 'Null' is restricted and can't be extended or implemented.
class BadImplements implements Null {}
// ^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
// ^
// [cfe] 'Null' is restricted and can't be extended or implemented.
// ^
// [cfe] 'Null' is restricted and can't be extended or implemented.
class BadMixin extends Object with Null {}
// ^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
// ^
// [cfe] 'Null' is restricted and can't be extended or implemented.
// ^
// [cfe] 'Null' is restricted and can't be extended or implemented.
class BadMixin2 = Object with Null;
// ^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
// ^
// [cfe] 'Null' is restricted and can't be extended or implemented.
// ^
// [cfe] 'Null' is restricted and can't be extended or implemented.